Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
According to MSDN application has the right to do it. What is prohibited is to set that field to SQL_NAMED. The problem is more important than seems since that is one of things ADO does when uses parameters
The fix and the testcase have been pushed as rev#39.
VB testcase would look something like
Const DSN = "DSN=test"
Const adParamInput = &H0001
Const adCmdText = &H0001
Const adVarChar=200
Dim conn, rs, fld, cmd, pr
Set conn = CreateObject("ADODB.Connection")
conn.Open(DSN)
Set cmd = CreateObject("ADODB.Command")
cmd.ActiveConnection = conn
cmd.CommandText = "SELECT b FROM t WHERE a=?"
cmd.CommandType = adCmdText
Set pr = CreateObject("ADODB.Parameter")
'pr.Name = "a"
pr.Type = adVarChar
pr.Direction = adParamInput
pr.Size = 10
pr.Value = "u1"
cmd.Parameters.Append(pr)
Set rs = cmd.Execute()