[ODBC-14] Application cannot set IPD's SQL_DESC_UNNAMED to SQL_UNNAMED Created: 2014-09-19  Updated: 2014-09-19  Resolved: 2014-09-19

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: 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



 Comments   
Comment by Lawrin Novitsky [ 2014-09-19 ]

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()

Generated at Thu Feb 08 03:25:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.