I seem to connect fine to Sybase through my VB.NET app, but when I run a
query I get this error message:

"[INTERSOLV][ODBC SQL Server driver][SQL Server]ct_con_props(SET,NETIO):
user api layer: external error: The buflen parameter must be set to
CS_UNUSED."

From my research I guess this is a known bug in Sybase and can be fixed
two ways. First by Updating the Open Client to 11.1.1 or by setting the
CursorDriver to rdUseIfNeeded. I pasted some code below from VB 6.0 that
uses this code and it does work fine. I'd like to use the code below in
my VB.NET app, but don't know how to set the cursor driver in .NET. I've
also pasted the code I'm using in .NET to connect, if someone could show
me an example...thanks
VB Code:
  1. Set grdoSybase = New rdoConnection
  2.    With grdoSybase
  3.       .Connect = "DSN=SBPROD;UID=" & logon & ";PWD=" & LCase(txtPassword)
  4.       .CursorDriver = rdUseIfNeeded
  5.       .QueryTimeout = 120
  6.       .EstablishConnection rdDriverNoPrompt
  7.    End With


VB Code:
  1. Dim strConSybase As String
  2. = "DSN=SBPROD;Server=SYBASE;DB=fmsprod;Password=test;User ID=test"
  3.         Dim objConSyBase As New OdbcConnection(strConSybase)
  4.         Dim objComSyBase As New OdbcCommand(sqlcmd, objConSyBase)
  5.         Try
  6.             objConSyBase.Open()
  7.             objDR2 = objComSyBase.ExecuteReader
  8.             If objDR.Read = True Then
  9.                 gerror_flag = True
  10.             Else
  11.                 gerror_flag = False
  12.             End If
  13.         Catch ex As Exception
  14.             MsgBox("FMS Validation Error: " & Err.Description)