Solved

MSSQL6.5 stored proc question

Posted on 1997-07-18
2
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

730 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