Hi Rich,
Our code is a follows:
Public Function fnbValidUserIDPassword(ByVal stUserID As String, ByVal
stPassword As String) As Boolean
On Error GoTo Exit_fnbValidUserIDPassword
Dim mEncrypt As New MessageDigest5
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rst As Recordset
Dim stSQL As String
fnbValidUserIDPassword = False
stSQL = "SELECT count(*) as UserCount from Users Where UserID = '"
& stUserID & "' and Password = '" & stPassword & "'"
cn.Open (gcstSQLServer_Directa)
rs.Open stSQL, cn, adOpenDynamic, adLockReadOnly
If Not (rs.EOF) Then
rs.MoveFirst
fnbValidUserIDPassword = (CInt(rs![UserCount]) = 1)
If Not (fnbValidUserIDPassword) Then
stSQL = "SELECT count(*) as UserCount from Authoriser
where AuthoriserID = '" & stUserID & "' and Password = '" & stPassword
& "' and DirectaUser = false"
Set rst = CurrentDb.OpenRecordset(stSQL, dbOpenSnapshot,
dbInconsistent, dbReadOnly)
If Not (rst.EOF) Then
rst.MoveFirst
fnbValidUserIDPassword = (CInt(rst!UserCount) = 1)
End If
End If
End If
Exit_fnbValidUserIDPassword:
cn.Close
Set cn = Nothing
Set rs = Nothing
End Function
****END OF CODE*****
The cn.Open (gcstSQLServer_Directa) part refers to our constant
section of the code - I've tested it and the connection settings are
definitely correct.
Cheers - David
On Jun 12, 4:14 pm, Rich P <rpng...@aol.comwrote:
Hi Dave,
Have you tried creating a new ODBC Dsn from Control panel since the DB
migration? Try creating a new ODBC Dsn from the Control Panel and then
try connecting to a table in the DB using this Dsn. If you can't create
the Dsn (you can't see the server from the Control Panel) then it is a
network problem. If you can create the Dsn but cannot access/see any
data in a data table from you mdb - then there is either a problem with
the workstation or with the DB. If you can't see data from the ODBC
connection - try creating a new blank mdb and see if you can see any
data from the ODBC connection in the new mdb.
If everything works normal with the ODBC connection then there is
something wrong with the code statement you are using. Perhaps you
could share your code statement.
Rich
*** Sent via Developersdexhttp://www.developersdex.com***