jsandoval
Active member
I am not getting back my data from the data source even though it exists and the SQL is using the correct restrictive values. I have attached the code for you to evaluate.
Thank you,
str = "SELECT ACGZCD, ACA1NB, ACADCD FROM PTADTAPD.SCDLRP " & _"Where ACGZCD = '" & Trim(strServiceGroup) & "' and " & _
"ACA1NB = " & intDealerNbr
Dim SelComm AsNew Odbc.OdbcCommand(str, OdbcConnection1)
OdbcDataAdapter1.SelectCommand = SelComm
OdbcDataAdapter1.SelectCommand.Parameters.Add(New _
Odbc.OdbcParameter("@strServiceGroup", Odbc.OdbcType.VarChar, 6))
OdbcDataAdapter1.SelectCommand.Parameters.Add(New _
Odbc.OdbcParameter("@intDealerNbr", Odbc.OdbcType.Int, 7))
OdbcDataAdapter1.SelectCommand.Parameters("@strServiceGroup").Value = strServiceGroup
OdbcDataAdapter1.SelectCommand.Parameters("@intDealerNbr").Value = intDealerNbr
OdbcConnection1.Open()OdbcDataAdapter1.SelectCommand.ExecuteNonQuery()OdbcConnection1.Close()
OdbcDataAdapter1.Fill(dSet)
intCnt = 0
Do
strCoId = CStr(DataBinder.Eval(dSet, _
"Tables[SCDLRP].DefaultView.0].ACADCD"))
intCnt = intCnt + 1
LoopWhile Trim(strCoId) = "" And intCnt < 1000
If strCoId = "" Then
strCoId = "***"
EndIf
Thank you,
str = "SELECT ACGZCD, ACA1NB, ACADCD FROM PTADTAPD.SCDLRP " & _"Where ACGZCD = '" & Trim(strServiceGroup) & "' and " & _
"ACA1NB = " & intDealerNbr
Dim SelComm AsNew Odbc.OdbcCommand(str, OdbcConnection1)
OdbcDataAdapter1.SelectCommand = SelComm
OdbcDataAdapter1.SelectCommand.Parameters.Add(New _
Odbc.OdbcParameter("@strServiceGroup", Odbc.OdbcType.VarChar, 6))
OdbcDataAdapter1.SelectCommand.Parameters.Add(New _
Odbc.OdbcParameter("@intDealerNbr", Odbc.OdbcType.Int, 7))
OdbcDataAdapter1.SelectCommand.Parameters("@strServiceGroup").Value = strServiceGroup
OdbcDataAdapter1.SelectCommand.Parameters("@intDealerNbr").Value = intDealerNbr
OdbcConnection1.Open()OdbcDataAdapter1.SelectCommand.ExecuteNonQuery()OdbcConnection1.Close()
OdbcDataAdapter1.Fill(dSet)
intCnt = 0
Do
strCoId = CStr(DataBinder.Eval(dSet, _
"Tables[SCDLRP].DefaultView.0].ACADCD"))
intCnt = intCnt + 1
LoopWhile Trim(strCoId) = "" And intCnt < 1000
If strCoId = "" Then
strCoId = "***"
EndIf