I have created a dataenvironment within VB which is connected to an ODBC database. I'm trying to creat a report from a command object added to the connection object in the dataenvironment. With the command object I want to be able to pass a parameter to it form within the program that the user would type or select. The command object is an SQL type. Everytime I go to run it from within the SQL Builder I get an error that states the following: "Provider cannot derive parameter information and SetParameterInfo has not been called." Second if I try to run my program and where the user would select what they would like to set the report to I get the following error: "Error -2147217833 [Microsoft][ODBC Microsoft Access Driver]String data, right truncated (null)". The following is some of my code.


SQL statement in the command object in the dataenvironment object

SELECT MEMBERS.IDNO, MEMBERS.FIRSTNAME,
MEMBERS.LASTNAME, GENTYPES.`DESC`,
MEMBERS.GENDATEPD, MEMBERS.GENAMTPD,
MEMBERS.GENCHECKNO, MEMBERS.GENEXPIRES,
MEMBERS.GENTYPE
FROM GENTYPES, MEMBERS
WHERE GENTYPES.GENTYPE = MEMBERS.GENTYPE AND
members.gentype = ?
ORDER BY MEMBERS.GENEXPIRES


Code in the program where the user/client will select or type in what they want.

Private Sub cmdTypeCode_Click(Index As Integer)
Dim DE As New YWCAEnvironment

Select Case Index
Case 0
If Trim(Me.Combo1.Text) = "Code" Then
MsgBox "You must select a type in order to generate the report! Please try again." _
, vbInformation, "Invalid Entry"
Exit Sub
End If
Select Case intReportType
Case 1
Screen.MousePointer = 11
mdiYWCA.StatusBar1.Panels(1).Text = "Please wait generating report..."
'DE.MemExp1 is the command object in the dataenvironment which accepts
'one parameter which is what the user/client wants to base the report on.
DE.MemExp1 UCase(Left(Me.Combo1.BoundText, 1))
Case 2
Screen.MousePointer = 11
mdiYWCA.StatusBar1.Panels(1).Text = "Please wait generating report..."
'DE.MemExp2 is the command object in the dataenvironment which accepts
'one parameter which is what the user/client wants to base the report on.
DE.MemExp2 Me.Combo1.BoundText
End Select
Case 1
End Select
Screen.MousePointer = 0
Unload Me
Exit Sub


Any help would be appreciated.