Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Done
-
1.0.6
-
None
-
None
-
Windows 2008 R2 64 bits, IIS 7.5, ASP Classic
MariaDB 10.1.16
Description
There is a simple schema 'test', a table 'test1', a column 'test1c' for char(10).
There is one record '123' in 'test'.'test1'
use ADODB RecordSet to retrieve data.
set a = "123"
sql = "select test1c from test.test1 where test1c = '" & a & "';"
rs = conn.execute(sql)
it will produce the error 'near testc = '123 error'
and if I debug for this problem by use response.write, the strange output occurs.
set a = "123"
sql = "select test1c from test.test1 where test1c = '" & a & "';"
response.write sql
rs = conn.execute(sql)
the result is
select test1c from test.tesmt1 where test1c = '123
(the following is error message for lacking the last part of sql statements)
once I add response.end after response.write sql, the result is the same.
set a = "123"
sql = "select test1c from test.test1 where test1c = '" & a & "';"
response.write sql
response.end
rs = conn.execute(sql)
and the last time I comment out the rs, and sql statements will be fine.
set a ="'123"
sql = "select test1c from test.test1 where test1c = '" & a & "';"
response.write sql
response.end
//rs = conn.execute(sql)
select test1c from test.test1 where tect1c = '123';
why is the rs affect the sql statements?