请各位高手帮我改改以下这个插入语句的代码!!十万火急!万分感谢!
dim strsql
strsql = "insert into issued ( Version , SerialNumber , SubjectName , IssuerName , ValidFromDate , ValidToDate , Certificate )
values ( " strsql = strsql & ILCA.Version "
strsql = strsql & ","" & left ( ILCA . SerialNumber , 20 ) & ","
strsql = strsql & ","" &ILCA . SubjectName & ","
strsql = strsql & ","" &ILCA . lssuerName & ","
strsql = strsql & ","" &ILCA . ValidFromDate & ","
strsql = strsql & ",""&ILCA . ValidToDate & ","
strsql = strsql & ","" &ILCA.Certificate & " ) " (此语句是否是这样写的?)conn .Execute strsql
Conn.Close
[解决办法]
顶楼和1楼的strsql是什么语句?你们在代码的最后response.write出来看看会是什么结果?
楼主在2楼贴的代码还算靠谱;但还是错的:
dim strsql strsql = "INSERT INTO issued (Version,SerialNumber,SubjectName,IssuerName,ValidFromDate,ValidToDate,Certificate) VALUES ('" _ & ILCA.Version & "','" _ & Left(ILCA.SerialNumber, 20) & "','" _ & ILCA.SubjectName & "','" _ & ILCA.lssuerName & "','" _ & ILCA.ValidFromDate & "','" _ & ILCA.ValidToDate & "','" _ & ILCA.Certificate & "')"conn.Execute strsql Conn.Close