Hi,
I am trying to use server.createobject("scriptlet.typelib").guid to generate a unique id that i can then insert in to my SQL table. Problem is it thinks there are quotation marks in the guid result and this breaks the insert statement.
I have searched google for an answer and can't seem to find one. Maybe someone here has tried the same thing and can help. Below is the code and results i have.
Thanks in advance.
Error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the character string '44D9B51F56A74B229DFAC4B76EDAA9D3'.
If i response.write linktoLuniqueIDlink to the screen this is what i get the below result which looks clean..
1B421E59B8FE4836B6604E2F3AA36846
I am trying to use server.createobject("scriptlet.typelib").guid to generate a unique id that i can then insert in to my SQL table. Problem is it thinks there are quotation marks in the guid result and this breaks the insert statement.
I have searched google for an answer and can't seem to find one. Maybe someone here has tried the same thing and can help. Below is the code and results i have.
Thanks in advance.
Code:
guid = server.createobject("scriptlet.typelib").guid
guid = replace(guid,"{","")
guid = replace(guid,"}","")
guid = replace(guid,"-","")
linktoLuniqueIDlink = guid
contactUniqueid = rstemp2("uniqueid")
mySQLupdatelinkto = "INSERT INTO wce_linkto (LuniqueID, LUTableName, LEntityID, LETableName) VALUES ('"&(linktoLuniqueIDlink)&"','"&("wce_history")&"','"&contactUniqueid&"','"&("wce_contact")&"')"
call updateDatabase(mySQLupdatelinkto, rstempm1, "continueSendingcm1")
Error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark after the character string '44D9B51F56A74B229DFAC4B76EDAA9D3'.
If i response.write linktoLuniqueIDlink to the screen this is what i get the below result which looks clean..
1B421E59B8FE4836B6604E2F3AA36846