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
special character
Re: special character
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
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
saple
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
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
Re: saple
Try to use DbxSda, http://crlab.com/dbx/ instead of standard driver.