Inserting GUID problem - TechRepublic
General discussion
September 12, 2000 at 04:12 AM
iampud

Inserting GUID problem

by iampud . Updated 25 years, 9 months ago

I have a interesting issue.

I am trying to create an account using SQL in a asp page. All I want to do is insert a record using the username they give and a newid that is created using the following code:
Function getGUID()
Dim myTypeLib
Set myTypeLib = Server.CreateObject(“Scriptlet.Typelib”)
getGUID = myTypeLib.guid
End Function

strGUID = getGuid()

strSQL = “insert into users (Friendlyname, userguid) VALUES (‘”
strSQL = strSQL + accountname
strSQL = strSQL + “‘, ”
strSQL = strSQL + strGUID
strSQL = strSQL + “)”

Now the problem is the fact I CAN NOT get the “)” to be added. I have tried and tried but with no luck. It seems as soon as it add the GUID it will not add any after it. not even in a response.write

Any suggestions would be great.

This discussion is locked

All Comments