|
Hi,
I have designed a database program that stores football stats. I have a search in the players section. Although it connects I get a runtime error:runtime error `3443`:
unrecognised database format `C:\test vb\neils vb program\clubhistory.mdb`.
I am using VB6 learning edition, and access 2000 connection string =
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test VB\Neils VB Program\Club_History.mdb;Persist Security Info=False
the code is thus;
Private Sub cmdPlayerSearch_Click()
`MsgBox "Sorry this option is not yet available"
Dim PlayerSX As String
Dim pxSQL As String
Dim pxdb As Database
Dim PXrs As Recordset
PlayerSX = InputBox("Please enter the player required - (Forname Surname).", "Player Search")
Set pxdb = OpenDatabase("C:/Test VB/Neils VB Program/ClubHistory.mdb")
pxSQL = "select * from players Where player =` " & PlayerSX & "`"
Set PXrs = pxdb.OpenRecordset(pxSQL)
If PXrs.BOF = True And PXrs.EOF = True Then
MsgBox ("Unable to locate player (check spelling)")
PXrs.Close
pxdb.Close
End If
Set PXrs = pxdb.OpenRecordset(pxSQL)
PXrs.Close
pxdb.Close
PLEASE HELP... why will it not show a) the results in the text boxes b) what is this run tiume error and how do I get over it ?
Please help thanks all.
|
|
|
|
|
|
|
|
|
// |