PSUIVERSON
Technical User
I am trying to write a variable to an ACCESS database. I setup the ODBC Connection without problem and part of the app already pulls in data from the database etc. However when I run the app and attempt to write to an ACCESS Table from the VB application I get a RUNTIME ERROR '3251'
"The operation requested by the application is not supported by the provider"
Here is my code:
...[Prior does other functions and captures the variable]...
Dim adoConnection As ADODB.Connection
Dim rst As ADODB.Recordset
Dim connectString As String
' Create a new connection
Set adoConnection = New ADODB.Connection
' Creat a new Recordset
Set rst = New ADODB.Recordset
' Build connection string
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\FFL\EY2003.mdb"
adoConnection.Open connectString
' Open Table and write the player to the team
rst.Open "Master_Teams", adoConnection
rst.MoveFirst
Do While Not rst.EOF
If IsNull(rst!Team1) Then
rst!Team1 = playerSelected ERROR HERE!
GoTo closeRecords:
End If
rst.MoveNext
Loop
closeRecords:
rst.Close
Set rst = Nothing
getout:
End Sub
"The operation requested by the application is not supported by the provider"
Here is my code:
...[Prior does other functions and captures the variable]...
Dim adoConnection As ADODB.Connection
Dim rst As ADODB.Recordset
Dim connectString As String
' Create a new connection
Set adoConnection = New ADODB.Connection
' Creat a new Recordset
Set rst = New ADODB.Recordset
' Build connection string
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\FFL\EY2003.mdb"
adoConnection.Open connectString
' Open Table and write the player to the team
rst.Open "Master_Teams", adoConnection
rst.MoveFirst
Do While Not rst.EOF
If IsNull(rst!Team1) Then
rst!Team1 = playerSelected ERROR HERE!
GoTo closeRecords:
End If
rst.MoveNext
Loop
closeRecords:
rst.Close
Set rst = Nothing
getout:
End Sub