Article View: borland.public.cppbuilder.database.ado
Article #620Borland C++Builder 6 & ADO - Problem with uniqueidentifier
From: Brian M. King
Date: Tue, 25 Oct 2005 17:46
Date: Tue, 25 Oct 2005 17:46
20 lines
2189 bytes
2189 bytes
I'm using the ADO classes such as TADOQuery, TADOCommand, etc, to
communicate with an SQL Server database. The problem I am having is
when I send a command to the database such as "SELECT SystemType FROM
SYS_HWDrivers WHERE ServerID='GUID'" (Where GUID is replaced by a valid
windows GUID), I get back a conversion error such as follows ..
SELECT SystemType FROM SYS_HWDriver WHERE
ServerID='{256724E7-E9DD-45DC-9F75-2E5072D9B855}'
[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting
from a character string to uniqueidentifier
I can't figure out why this is happening, I've tried with sending
through a TADOQuery object, and a TADOCommand object, I've even tried
giving it to TADOCommand->CommandText as a BSTR with the same results,
but if I put that same exact command into MS SQL Query Analyzer for
Enterprise Manager it works perfectly fine. I've even tried explicitly
calling the SQL CAST() function with the same results. It is urgent
that I get this working ASAP so any help is greatly appreciated, thanks.
Technical Details
Message-ID:
<1130262392.492315.205950@f14g2000cwb.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,3521e2573967c454,start X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "Brian M. King" <briank@seiboldsecurity.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Borland C++Builder 6 & ADO - Problem with uniqueidentifier Date: 25 Oct 2005 10:46:33 -0700 Organization: http://groups.google.com Lines: 21 Message-ID: <1130262392.492315.205950@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: 209.63.177.2 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1130262398 30878 127.0.0.1 (25 Oct 2005 17:46:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 25 Oct 2005 17:46:38 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=209.63.177.2; posting-account=aQXZpg0AAABobWeW_I-J8e8Czq3-GRuZ