Article View: borland.public.cppbuilder.database.dbexpress
Article #198TSQLStoredProc - ftString parameter does not work with SQL Server 2005
From: Remy Lebeau (TeamB)
Date: Tue, 22 Jul 2008 20:19
Date: Tue, 22 Jul 2008 20:19
23 lines
1973 bytes
1973 bytes
I have a stored procedure in SQL Server 2005 that has 3 parameters - 2 nvarchar(64) parameters and 1 int parameter. Internally, the procedure builds up an XML string (for inserting elements into an existing schema collection). I configured TSQLStoredProc to hold two ftString and one ftInteger TParam objects. If I try to run the stored procedure using TSQLStoredProc, SQL Server fails with an "illegal xml character" error. Even weirder, the error reports a character index that is inside a standard XML tag with valid characters in it. I am assigning plain Ansi strings to the TParam::Value property. No MBCS involved. However, if I run the same stored procedure via TSQLQuery using an "EXECUTE" SQL statement, everything works fine. Does an ftString TParam work correctly with SQL Server 2005? I tried ftWideString, but then I get an "unsupported type" error from SQL Server when executing the procedure. Gambit
Technical Details
Message-ID:
<4886412b$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fb4e2,b97d124627a25ec4,start X-Google-Attributes: gidfb4e2,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.database.dbexpress Subject: TSQLStoredProc - ftString parameter does not work with SQL Server 2005 Date: Tue, 22 Jul 2008 13:19:21 -0700 Lines: 25 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 207.178.157.90 Message-ID: <4886412b$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1216758059 207.178.157.90 (22 Jul 2008 13:20:59 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1820