Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

MSSQL6.5 stored proc question

Hi there,

I am experiencing a problem using a SQL server 6.5 stored procedure in delphi 2.0. One of the input parameters for the stored procedure is of type text- ie a blob field- however, there is no way to secify this as the data type for the parameter using the parameters editor. If I specify it to have type string, then longer values assigned to the parameter become truncated after roughtly 255 characters. I have also tried to get around the problem using the Assingn method, but without success. Any help in this regard would be greatly appreciated.

Thanks.
.
0
Hvdriet
Asked:
Hvdriet
1 Solution
 
M_HoeperCommented:
Try to execute the stored proc in a TQuery.

TQuery.SQL:

  execute <stored proc> 'texttexttext'

Example:

  with AQuery do
  begin
    Active := false;
    SQL.Clear;
    SQL.Add('execute the_real_storedproc '''+AMemo.Text+'''');
    ExecSQL;   // when You except no result
//  Open;         when You expect a result table
  end;

You have to double all the hooks in the Memo, before you send it with the stored proc, because MSSQL works like pascal. A hook in the string represents the beginning or the end. Two hooks represents a single hook. :*)

Marc
0
 
HvdrietAuthor Commented:
It works fine, thanks very much.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now