Re: Writing a GUID to a SQL table



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???



"McKirahan" <News@xxxxxxxxxxxxx> wrote in message
news:EdWdnR4ZRN2INCzeRVn-ig@xxxxxxxxxxxxxx
> "Phil Kelly" <phil.kelly@xxxxxxxxxxxx> wrote in message
> news:em#ToIyCGHA.2912@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi Bob
>>
>> OK, this is the exact code that I am using:
>>
>> accountguid = server.createobject ("scriptlet.typelib").guid
>> response.write(accountguid)
>>
>> WriteToTable = "INSERT into tbl_users(fld_firstname, "&_
>> " fld_surname, "&_
>> " fld_address1, "&_
>> " fld_address2, "&_
>> " fld_city, "&_
>> " fld_county, "&_
>> " fld_postcode, "&_
>> " fld_country, "&_
>> " fld_accountGUID) "&_
>> " VALUES "&_
>> " ('"& Request.Form("fld_firstname") &"', "&_
>> " '"& Request.Form("fld_surname") &"', "&_
>> " '"& Request.Form("fld_address1") &"', "&_
>> " '"& Request.Form("fld_address2") &"', "&_
>> " '"& Request.Form("fld_city") &"', "&_
>> " '"& Request.Form("fld_county") &"', "&_
>> " '"& Request.Form("fld_postcode") &"', "&_
>> " '"& Request.Form("fld_country") &"', "&_
>> " '"&accountguid&"')"
>>
>> 'Set CreateAccountAction = Connect5.Execute(writeToTable)
>> response.write(Connect5.Execute(writeToTable))
>>
>> When I execute this code (to provide the response.write), I get the
>> following (which appears identical to the error I gave earlier, apart
>> from
>> the line number of the error):
>>
>> {DA0FCCBE-E3C2-42CA-8505-37080DD1D8D2}
>> Microsoft OLE DB Provider for SQL Server error '80040e14'
>>
>> Unclosed quotation mark before the character string
>> '{DA0FCCBE-E3C2-42CA-8505-37080DD1D8D2}'.
>>
>> /testapp/Step1CreateAccountWrite.asp, line 38
>>
>> Does it make sense now?
>>
> [snip]
>
> A Response.Write does not execute the SQL statement;
> it just displays the contents of the variable "WriteToTable".
>
> Please, just run it with these two lines after "WriteToTable =":
>
> Response.Write(WriteToTable)
> Response.End
>
> Post what is displayed.
>
>


.



Relevant Pages

  • Re: Writing a GUID to a SQL table
    ... > Hi Bob ... this is the exact code that I am using: ... > Microsoft OLE DB Provider for SQL Server error '80040e14' ... A Response.Write does not execute the SQL statement; ...
    (microsoft.public.inetserver.asp.db)
  • Re: Address Book for All Users Points to the Same wab file
    ... MAKE SURE THAT YOU DOWNLOAD THE VB FILE - DON'T EXECUTE IT! ... Then I opened the VB script using NotePad and set up my path the ... [Notice the two instances of Bob] ... >>> logging on into those accounts. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Error with insert into statement
    ... It tells ADO that you want it to execute a sql statment ... Bob Barrows ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.general)
  • RE: BACK
    ... You can use javascripts history.gocommand to execute the back operation. ... Rgds, ... Anand ... "Bob" wrote: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: user-defined fct/macro
    ... > Hi Bob and Niek ... > it's like Bob said. ... > execute the function because it's not globally available but only in ... > the macro executes the function and it works, so that's what i am using ...
    (microsoft.public.excel.programming)