General information
Category:
Database DAO/RDO/ODBC/ADO
Title:
ODBC error Unclosed quotation mark before the character str
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only