Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing strings to stored procedures

Status
Not open for further replies.

delfy

MIS
Feb 8, 2005
96
JM
what is the maximun lenght string that can be passed to stored procedure using delphi 6 and sql server 7 why i asked is because i am trying to pass as string like this:

ParamByName('@lastsale').AsString := lastsale

lastsale is declared as a string in delphi and varchar(500) in sql server. in delphi it cotains data of lenght 234 and when passed to sql server the string cut off to about 160 which does not make sense which is it being cut off? any one has any ideas about this??

 
Which data access components are you using? ADO? BDE?

-D

A computer only does what you actually told it to do - not what you thought you told it to do.
 
i am using bde with the TStoredProc component
 
delfy:

Any chance that data contains x'00'? Chances are the SQL server is written in VC++ and even though Delphi can handle strings with x'00' embedded in them, C will stop short.



Regards and HTH,
JGS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top