Solved

MSSQL6.5 stored proc question

Posted on 1997-07-18
2
160 Views
Last Modified: 2010-04-06
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
Comment
Question by:Hvdriet
2 Comments
 

Accepted Solution

by:
M_Hoeper earned 200 total points
ID: 1339159
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
 

Author Comment

by:Hvdriet
ID: 1339160
It works fine, thanks very much.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now