Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC error Unclosed quotation mark before the character str
Message
 
 
To
All
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
ODBC error Unclosed quotation mark before the character str
Miscellaneous
Thread ID:
00811716
Message ID:
00811716
Views:
41
Hello all,

I am building a sql batch string and execute it from connection.execute command. When I run the code from vb via conn.execute strBatch, I am getting the following error:Unclosed quotation mark before the character string

'If yes, what are the results of your lipid profile? (Target LDL &lg 100 mg/dl, Target HDL: men &lg45 mg/dl, women &lg 55 mg/dl, Triglycerides &lg150) (CM should record the results of the lipid profile here and in the Diagnostic Data Field of the Medical History Tab '

-2147217900 (80040e14)

What is strange with it is that if I copy the batch sql into sqlserver analyzer , the batch runs without errors.

I set a trace thru the profiler and the sql batch string gets truncated right after History Tab words.


Thank you very much for your help,

Vlad

Here is the sql batch:



declare @questionID integer;
SET NOCOUNT ON;
INSERT INTO QUESTIONS (Sequence,AssessmentTypeID,QuestionProviderID,AnswerTypeID,Question,Required,LinkToPage,Data,Dateupdated)
VALUES
(40,2,1,8,
'If yes, what are the results of your lipid profile? (Target LDL &lg 100 mg/dl, Target HDL: men &lg 45 mg/dl, women &lg 55 mg/dl, Triglycerides &lg 150) (CM should record the results of the lipid profile here and in the Diagnostic Data Field of the Medical History Tab ',0,'','','7/18/2003 6:25:39 PM');
set @questionID=@@IDENTITY;
NSERT INTO QuestionDiseaseTypes(DiseaseTypeID,QuestionID) values (4,@QuestionID );
INSERT INTO QuestionDiseaseTypes(DiseaseTypeID,QuestionID) values (5,@QuestionID );
INSERT INTO QuestionDiseaseTypes(DiseaseTypeID,QuestionID) values (2,@QuestionID );
INSERT INTO QuestionQuestionCategories(QuestionCategoryID,QuestionID) values (3,@QuestionID );
INSERT INTO QuestionDomainTypes(DomainTypeID,QuestionID) values (10,@QuestionID );INSERT INTO QuestionReferralTypes(ReferralCodeID,QuestionID,DateUpdated) values (1,@QuestionID,'7/18/2003 6:25:39 PM');
Reply
Map
View

Click here to load this message in the networking platform