RE: odbccommand cant interpret some /*xxx*/ comments
- From: Mauro SB <MauroSB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Aug 2008 06:47:01 -0700
Hi Pak, tnaks for anwser, finally i found the problem, it shows up if in the
comment i use the word "select". i tried with many sql reserverd words, but
only select trigers the problem. i cant put all the code because of my
company restrictions but i give you the following info about the
scenario(weird scenario):
db server is : Adaptive Server Enterprise/12.5.4/EBF 14921
ESD#7/P/RS6000/AIX 5.1/ase1254/2095/64-bit/FBO/Fri Oct 12 12:11:32 2007
the odbc driver used is the one of SQL server 7
connection info:
OdbcConnection conn = new OdbcConnection();
StringBuilder str = new StringBuilder();
str.Append("Driver={SQL Server};");
str.Append("Server=" + ServerIP + ",");
str.Append(ServerPort + ";Network=DBMSSOCN;");
str.Append("UID=" + User + ";");
str.Append("PWD=" + Password + ";");
str.Append("Database=" + DBName + ";");
portion of code of the sp creation:
/*************************************************************************
select
*************************************************************************/
CREATE procedure spPrueba2
as
BEgIN
..
..
..
..
thaht will throw:
ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect
syntax near the keyword 'BEgIN'.
if you replace the select word in the comment with any other word, it runs
smothly.
tnks in advance for your time!
"Pak-Ming Cheung [MSFT]" wrote:
I have tested your given SProc in ODBC Test (shipped inside MDAC SDK 2.8). I.
found that there is no problem if i put your given command into SQLExecDirect.
So, could you give us the exact program that can reproduce the problem?
Thanks,
Ming.
MDAC Team, Microsoft.
"Mauro SB" wrote:
Hi,
does anybody knows why can an odbccommand throw a "incorrect syntax near
begin" when i try to execute something like this:
/********************
**sp description **
********************/
create procedure spSomething
@var int
as
begin
.
.
.
end
if i split the coment it works fine, but i need the comment :D
executing from query analyzer or alikes works fine!! but not with ODBC
tnks in advance!
- Follow-Ups:
- RE: odbccommand cant interpret some /*xxx*/ comments
- From: Pak-Ming Cheung [MSFT]
- RE: odbccommand cant interpret some /*xxx*/ comments
- References:
- odbccommand cant interpret some /*xxx*/ comments
- From: Mauro SB
- RE: odbccommand cant interpret some /*xxx*/ comments
- From: Pak-Ming Cheung [MSFT]
- odbccommand cant interpret some /*xxx*/ comments
- Prev by Date: RE: SQLGetData not working with SQLFetchScroll when trying to fetch re
- Next by Date: acheter achat ampicillin generique pharmacie en ligne us usa acheter ampicillin us usa a vendre acheter ampicillin belgique Generique Inde Achat acheter ampicillin canada Simple
- Previous by thread: RE: odbccommand cant interpret some /*xxx*/ comments
- Next by thread: RE: odbccommand cant interpret some /*xxx*/ comments
- Index(es):
Relevant Pages
|
Loading