Forums

This topic is locked

Error

Posted 19 Apr 2004 17:04:30
1
has voted
19 Apr 2004 17:04:30 Reg Coles posted:
Get the following error:
Syntax error converting from a character string to uniqueidentifier.

Can a character be converted to a uniqueidentifier? If not how can I get around this problem.

Replies

Replied 19 Apr 2004 19:33:44
19 Apr 2004 19:33:44 Dave Thomas replied:
i don't think so.

what is it your doing, and where are you getting the error.

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 20 Apr 2004 12:13:05
20 Apr 2004 12:13:05 Reg Coles replied:
Created a textbox in dreamweaver which needs to enter data into a 'entity' on the database. Created a recordset for the 'entity' but when I do a test instead of getting data is comes out as follows: "{071AF014.....} and on the insert data I choose the correct column and text as the submit. When I submit the data I get the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting from a character string to uniqueidentifier.

Thanks
Reg
Replied 20 Apr 2004 14:03:10
20 Apr 2004 14:03:10 Dave Thomas replied:
it looks to me like another field problem.

your trying to insert a string, into an id column, which is unique.

wild guess here, but i'd say it's the equivalent of the primary key in Access.
This is an auto-incrementing field, and should not be touched.
When you insert data, where it has a primary key, you dont insert the primary key field, leave this out and when the message is inserted, a primary key is created.

workaround is to either change your field "type" or redo the DB.

also noticed an error of this nature on MSDN (msdn.microsoft.com/) relating to MS Commerce Server. Your not using that by any chance are you?

Regards,
Dave

[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 20 Apr 2004 20:26:07
20 Apr 2004 20:26:07 Vince Baker replied:
With sqll server you can create a numeric field and then give it a seed value (number to start on) and then an incremental value (will automatically be added to the seed value each time a record is entered)

You cannot insert into a column of this type. Either create a unique number in the script on your page (not recommended) or use the seeded increment in sql server

Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 21 Apr 2004 18:19:06
21 Apr 2004 18:19:06 Reg Coles replied:
Please look at my other post "Lookup Fields" where all is explained.

Thanks

Edited by - regc on 21 Apr 2004 18:19:33

Reply to this topic