shawne
Well-known member
Anyone have an idea why the following code does not work? It just hangs when trying to connect to the database via trusted connection.
The application is actually a windows service which is suppose to run at user controlled intervals and update a database. It's really a simple application, i'm just stuck on this.
Private Sub Timer1_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
Dim Mydata As ADODB.Connection
Dim objRS As ADODB.Recordset
Mydata = New ADODB.Connection
Mydata.ConnectionString = "{SQL Server};Server=myserver;Database=mydb"
Mydata.Open()
objRS = Mydata.Execute("SELECT * FROM mytable")
The application is actually a windows service which is suppose to run at user controlled intervals and update a database. It's really a simple application, i'm just stuck on this.