OrthoDocSoft
Programmer
Folks, I'm an obvious newbie to databases and I'm having problems. Here's my stuff:
DATABASE (ACCESS 2002 FORMAT)
Name of database: MyDatabase.mdb
Table: MyTable
Fields in MyTable: Name, IDNumber(autonumber)
VB6 CODE
In a basic module, I have declared
In MyForm_general I have:
In MyForm_load sub I have:
The point is to generate a recordset here that basically has one record in it which should match the string obtained from the textbox. When I run this I get the following error message:
"No value given for one or more required parameters."
Can anyone see what parameter(s) I am not providing?
Thank you,
Ortho![[lookaround] [lookaround] [lookaround]](/data/assets/smilies/lookaround.gif)
DATABASE (ACCESS 2002 FORMAT)
Name of database: MyDatabase.mdb
Table: MyTable
Fields in MyTable: Name, IDNumber(autonumber)
VB6 CODE
In a basic module, I have declared
Code:
Public adoConnection As ADODB.Connection
Public connectString as String
In MyForm_general I have:
Code:
Dim strRecordNameImSearchingFor As String
In MyForm_load sub I have:
Code:
Dim adoRSMyRecordset As ADODB.Recordset
Set adoConnection = New ADODB.Connection
connectString = "Provider = Microsoft.jet.oledb.4.0;" _
& "Data Source=C:\Program Files\microsoft visual studio\vb98\databases\MyDatabase.mdb"
adoConnection.Open connectString
Set adoRSMyRecordset = New ADODB.Recordset
strRecordNameImSearchingFor = Trim(txtMyTextbox.Text)
adoRSMyRecordset.Open ("SELECT * FROM MyTable WHERE" _
& " Name = " & strRecordImSearchingFor), adoConnection, _
adOpenKeyset, adLockOptimistic
The point is to generate a recordset here that basically has one record in it which should match the string obtained from the textbox. When I run this I get the following error message:
"No value given for one or more required parameters."
Can anyone see what parameter(s) I am not providing?
Thank you,
Ortho
![[lookaround] [lookaround] [lookaround]](/data/assets/smilies/lookaround.gif)