Unanswered: Not a valid user for the Database
I've had an Access app running for somewhat over 3 months now, that has a small search feature looking up records in a SQL server database and adds them to the local Access database.
Its been working nicely until just yesterday, where the program does either nothing or reports that the user isn't a valid user for the database Grip.
The awkward bit is that (if you notice) the database I'm using is called Grip_UDV (which is a developer edition of the Grip database) while the connection tries to access Grip instead.
Dim udvalg As ADODB.Recordset
Set udvalg = New ADODB.Recordset
Dim forbindelse As ADODB.Connection
Set forbindelse = New ADODB.Connection
Dim sql As String
sql = "SELECT * FROM md_vw_gripinfo WHERE gripid = " & Str(box_grip.Value)
forbindelse.Open "PROVIDER=SQLOLEDB;SERVER=DBServer;DATABASE=Grip_UDV;User ID=Test;Password=test"
Set udvalg.ActiveConnection = forbindelse
udvalg.Source = sql
udvalg.Locktype = adLockReadOnly
udvalg.CursorLocation = adUseServer
'Set the form's Recordset property to the ADO recordset
Set Me.subform_udvalg.Form.Recordset = udvalg
Set udvalg = Nothing
Set forbindelse = Nothing
If I try logging into the SQL-server using query analyzer using the user ID TEST and password TEST, it defaults to Grip_UDV and selects without a hiitch.
So I don't know where to from there.
IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....