I am having difficulty integrating parameter queries into my ado.net/vb.net project (2003 version). I get the following error message from the following code
Error" Additional information: The OdbcParameterCollection only accepts non-null OdbcParameter type objects, not SqlParameter objects."
My goal is to check for the existence of a customer master record before adding another one. I was told the ODBCCommands would be the best way here, but I'm having difficulty getting the parm query to run and check for existence of the record so I can proceed with what to do next.
I apologize if this is in the knowledge-base and I've missed it.
Thanks for your help
Dim odbccn1 = New OdbcConnection(sConnection)
Dim cmdselect = New OdbcCommand("select * from customer_master where custid=?", odbccn1)
cmdselect.commandtype = CommandType.Text
Dim odbcda1 = New OdbcDataAdapter
odbcda1.selectcommand = cmdselect
Dim workParam As New SqlParameter("@CustID", SqlDbType.NChar, 5)
workParam.Direction = ParameterDirection.Output
cmdselect.Parameters("@CustID").Value = 1111
Dim ds = New DataSet
Catch exc As System.Exception