special character

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
chivofbv

special character

Post by chivofbv » Fri 12 Nov 2004 14:33

i'm using a sqlquery to insert in a ms sql db, when i'm execute this insert in delphi, in the database appear a spacial character, i see the string in delphi and doesn't have any character at the end of the string, i need your's help, what can i do for delete this character in th insert?

tks for any help

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: special character

Post by Ikar » Fri 12 Nov 2004 14:39

Send us please small demo project to demonstrate the problem
and include script to create server objects.

Supply us following information

- Version of Delphi or C++ Builder
- Version of DbxSda. You can find it in ReadMe.txt or in DLL version info
- Version of Microsoft SQL Server and OLE DB provider that you use

chivofbv

saple

Post by chivofbv » Fri 12 Nov 2004 14:56

in MS SQL DB i create a table with varchar fields

dbexpmmss.dll V 7.0.2.113
i put the dlphi components and realise the basic configuration

hostname = hostname
databasename = databasename
usser = usser
password = password

i'm assosiate the sqlquery with this sqlconnection, and the code i use to realise the insert is

SQLQuery1.Close;
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('INSERT INTO TABLE(Field_Name) VALUES(:Field_Name)');
SQLQuery1.ParamByName('Field_Name').AsString := 'NA';
SQLQuery1.ExecSQL(false);

the result in the database is 'NA ' this space is a square and the length of this field is 3

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: saple

Post by Ikar » Mon 15 Nov 2004 12:24

Try to use DbxSda, http://crlab.com/dbx/ instead of standard driver.

Post Reply