Re: Writing a GUID to a SQL table
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 27 Dec 2005 18:30:11 -0500
Phil Kelly wrote:
> INSERT into tbl_accounts(fld_firstname, fld_surname, fld_address1,
> fld_address2, fld_city, fld_county, fld_postcode, fld_country,
> fld_accountGUID) VALUES ('Firstname', 'Surname', 'addr1', 'addr2',
> 'Bury', 'Lancashire', 'BB11BB', 'GB',
> '{1E0E9020-8025-4A11-8B8A-DF2F29882054}
> Which I assume tells me that the INSERT statement is not correctly
> terminated - but looking at the code it seems to be???
>
What do you see when you do this:
Response.Write vartype(accountguid)
I'm thinking that you may need to explicitly cast accountguid as a string
before attempting to concatenate it into your dynamic sql (ugh!) statement.
Like this:
accountguid=cstr(accountguid)
My suspicion is that an error is occurring when attempting to do that final
concatenation, an error that is being masked by an "on error resume next"
statement, which explains why the ending quote and closing parenthesis are
missing from the result.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: Writing a GUID to a SQL table
- From: Phil Kelly
- Re: Writing a GUID to a SQL table
- References:
- Writing a GUID to a SQL table
- From: Phil Kelly
- Re: Writing a GUID to a SQL table
- From: McKirahan
- Re: Writing a GUID to a SQL table
- From: Phil Kelly
- Re: Writing a GUID to a SQL table
- From: Bob Barrows [MVP]
- Re: Writing a GUID to a SQL table
- From: Phil Kelly
- Re: Writing a GUID to a SQL table
- From: Bob Barrows [MVP]
- Re: Writing a GUID to a SQL table
- From: Phil Kelly
- Re: Writing a GUID to a SQL table
- From: McKirahan
- Re: Writing a GUID to a SQL table
- From: Phil Kelly
- Writing a GUID to a SQL table
- Prev by Date: Re: Writing a GUID to a SQL table
- Next by Date: Re: Writing a GUID to a SQL table
- Previous by thread: Re: Writing a GUID to a SQL table
- Next by thread: Re: Writing a GUID to a SQL table
- Index(es):