In DELPHI how to *. SQL script (a stored procedure scripts) to run to the database?

Category: Delphi -> Database Author: zhouqiong0 Date: 2001-07-10 08:34:56
 
zhouqiong0
2001-07-10 08:34:56
In DELPHI how to *. SQL script (a stored procedure scripts) to run to the database?
z34518006
2001-07-10 08:48:05

first read from the file *. sql content on a string inside, but then one should GO remove
ADOCommand components, settings ADOCommand the commandtext is just a string you can pull
chenshen0168
2001-07-10 09:06:21
Buddha to the West, to write a stored procedure is also very simple:
/ *
Function:
Executive @ strSQL statement
* /
CREATE PROCEDURE sp_ExecSQL (@ strSQl text) AS
exec (@ strSQL)
zly84590
2001-07-10 09:10:24
isql.exe it comes with SQLServer
shensi51
2001-07-10 09:21:56
comes with SQLServer Query Analyzer, File --- Open ---
kentkent123
2001-07-10 09:33:15
can not use SQL comes, I To DELPHI procedures implemented.
leefqang
2001-07-10 09:48:02
built on the SQL server stored procedure Exec_SQL (@ strSQL text)
read in delphi. sql file contents as a parameter to the stored procedure.
sw918071807
2001-07-10 09:53:07
But this is the first line after the operation prompts an error, which is why?
houzhenhua007
2001-07-10 10:09:19
error message is what?
longlong99999
2001-07-10 10:13:09
I wrote this stored procedure,
CREATE PROCEDURE sp_ExecSQL (@ strSQl text) AS
exec (@ strSQL)

then stroedproc call
with SP_exec do
begin
close;
procedurename: = 'sp_ExecSQL; 1 ';
Parameters.ParamByName (' @ strSQl '). Value: = filename;
ExecProc;
close;
end;

But this is the first line after the operation prompts an error, which is why?
miaochunjiao
2001-07-10 10:21:13
parameter type how not set? In addition, filename is the file name? Should be read from the file string
Sdmdra
2001-07-10 10:38:52
you are referring to is a compile-time error error you
xq110000
2001-07-10 10:48:35
Upstairs
parameter refresh
sp_exec.Parameters . refresh;
ybdtsn
2001-07-10 11:05:33
I also wonder how the content without using scripts created directly stored procedures do?
kinyanderson
2001-07-10 11:16:03
I also wonder, why not use it to build stored procedures scripts directly?
hjkl3165989
2001-07-10 11:23:50
put 'sp_ExecSQL; 1' replaced 'sp_ExecSQL' try
f52361314
2001-07-10 11:42:56
same.
stored procedure is no error in the establishment, but in the process is called error . (Tip stored procedure error line 1)
my incoming filename, the file's contents.

kittyyiyi1227
2001-07-10 11:50:11
AdoQuery1.SQL.LoadFromFile
canonxu
2001-07-10 12:02:18
AdoQuery1.SQL.LoadFromFile
with the same results, suggesting that The first line there is an error.
edith23
2001-07-10 12:14:45
TStoredProc

Page 1 of 2    «  »