H
hkadhim
hi all,
i am using the following:
Public Sub Main()
Try
'set the ado connection string
Dim strConnection As String = "Provider=" & "Microsoft.Jet.OLEDB.4.0;" &
"Data Source=C:\MyFolder\data1.mdb;" & "Jet OLEDBatabase Password=" & ""
'try to open the ado connection
cnn.Open(strConnection)
'set cursor location of recordset to client...
'rsControl.CursorLocation = ADODB.CursorLocationEnum.adUseClient
MyfrmLogin.Show()
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
End Try
End Sub
I am trying to set the database connection from the Sub Main(). now when i
go to project properties, i selected Sub Main as the startup object but it
will show for a while and unload itself quickly. i used to do it in VB6 all
the time but i am now with VB.NET 2003 i am a bit confused. how can i force
the project to start from the Sub Main()?
thanks alot
i am using the following:
Public Sub Main()
Try
'set the ado connection string
Dim strConnection As String = "Provider=" & "Microsoft.Jet.OLEDB.4.0;" &
"Data Source=C:\MyFolder\data1.mdb;" & "Jet OLEDBatabase Password=" & ""
'try to open the ado connection
cnn.Open(strConnection)
'set cursor location of recordset to client...
'rsControl.CursorLocation = ADODB.CursorLocationEnum.adUseClient
MyfrmLogin.Show()
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
End Try
End Sub
I am trying to set the database connection from the Sub Main(). now when i
go to project properties, i selected Sub Main as the startup object but it
will show for a while and unload itself quickly. i used to do it in VB6 all
the time but i am now with VB.NET 2003 i am a bit confused. how can i force
the project to start from the Sub Main()?
thanks alot