VB6 BEGINNER,
Hi,
I need help i am new to programming and have just completed my first database with the aid of a book but am having problems connecting ADO to ACCESS 2000 using the connection and recordset object i get an error message ARGUMENT NOT OPTIONAL when i call my dataopen function from my first form below is the code for connectstring() opendata() and my rota program.
hope someone can help.
cheers
Andy.
option explicit
public goConn as adodb. new connection
Public Function DataOpen(oConn As Connection) As Boolean
[login to view URL] = adUseClient
' Set the connection string by calling
' a function.
[login to view URL] = ConnectString()
' Set the mode of the connection
[login to view URL] = adModeReadWrite
' Open the Connection
[login to view URL]
DataOpen = True
End Function
Public Function connectstring() As String
' Jet MDB
connectstring = "Provider=Microsoft.Jet.OLEDB.4.00" & _
";Data Source=C:\My Documents\[login to view URL]"
End Function
Private Sub RotaLoad()
Dim oRS As Recordset
Dim strSQL As String
Dim strLine As String
strSQL = "SELECT id,"
strSQL = strSQL & "first,"
strSQL = strSQL & "last,"
strSQL = strSQL & "start_time,"
strSQL = strSQL & "finish"
strSQL = strSQL & "FROM tblrota"
Set oRS = New Recordset
[login to view URL] , strSQL, goConn(), _
adOpenForwardOnly, _
adLockReadOnly
With grdrota
Do Until [login to view URL]
strLine = oRS("first") & vbTab & _
oRS("last") & vbTab & _
oRS("start_sand") & vbTab & _
oRS("start_food") & vbTab & _
oRS("finish") & vbTab & _
oRS("id")
.AddItem strLine
[login to view URL]
Loop
End With
[login to view URL]
End Sub
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s)
all source code included, specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
## Platform
"windows 95/98/ME