Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Strange behavior in ASP using GUID generator.
Old 03-15-2005, 09:35 PM Strange behavior in ASP using GUID generator.
Novice Talker

Posts: 5
Location: Tampa, FL
Trades: 0
OK, I am doing an e-mail address verification script for an ASP app that I'm writing and I'm trying to use a GUID generator but I'm having strange problems. Here is the code:

<----Begin Code---->
Function GetGuid()
Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
GetGuid = TypeLib.Guid
Set TypeLib = Nothing
End Function

guid = getguid()

response.write(guid & "test")

<----End Code---->

The above is ofcourse example code but the output of that (at least on my server is:

<---- Being Output ---->

{5863AF9A-5E49-4740-9325-E7FF10681807}

<---- End Output---->


It is as if it is ignoring everything after the last curly brace. This one is driving me crazy. Any help would be awesome.

Thanks in advance guys.
tommy.hanks is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-16-2005, 05:27 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Strange...
Can't you just use:
response.write(guid)
response.write("test")
?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 03-16-2005, 07:55 AM
Novice Talker

Posts: 5
Location: Tampa, FL
Trades: 0
That would work, but I need the two strings to belong to the same variable as ultimately the GUID is part of a SQL query.
tommy.hanks is offline
Reply With Quote
View Public Profile
 
Old 03-16-2005, 05:47 PM
Novice Talker

Posts: 5
Location: Tampa, FL
Trades: 0
Problem found. The function that I'm using appends an ASCII 0 to the end of the string, ending the line. Doing a left(guid, 38) fixes the problem. Back to development!
tommy.hanks is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Strange behavior in ASP using GUID generator.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13878 seconds with 12 queries