Solved

MSSQL6.5 stored proc question

Posted on 1997-07-18
2
171 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 78
Working with hours 3 56
creating threads in delphi 1 101
firemonkey keyboard covers the controls 1 25
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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