PDA

View Full Version : Database Web Access


russellrl2
04-09-02, 14:50
A couple of years ago, a project hired a student to write VB5 code to link a Microsoft Access 97 database to their website. This was originally setup on a Windows NT 4.0 server. We moved the site to a Windows 2000 server and everything seems to work except opening the database. No experts on VB5 here anymore. We know that it is not a permissions issue. Here is the main code for opening the database. Is there something we have to change to make it work on Windows 2000.

Dim ProfileName As String, ProfileDate As String, StartTime As String
Dim i As Integer
Dim MyFile As String
Dim MyWorkspace As Workspace, MyDatabase As Database
Dim Rs As Recordset
Dim SQLquery As String
Dim ErrorCondition As Integer

MyFile = "d:\wwwroot\_vti_log\beach.mdb"
' MyFile = "d:\thscmp_cgi\Beach.mdb"
On Error GoTo DBErrorHandler
Set MyWorkspace = Workspaces(0)

' Send "reach request profile </body></html>"

Set MyDatabase = MyWorkspace.OpenDatabase(MyFile)

' Send "reach request profile </body></html>"

If Not ErrorCondition Then
On Error GoTo RecordErrorHandler
'open record set
SQLquery = "SELECT * FROM [Beach profiles]"
Set Rs = MyDatabase.OpenRecordset(SQLquery, dbOpenDynaset)

Rafael_Machado
04-10-02, 14:38
Hi russellrl2,

What is the error message that you get when you open database?

regards,

Rafael

russellrl2
04-11-02, 07:07
We are not getting an error other than Can't Open Database.

Robert_Webb
04-15-02, 13:43
Have you looked at the old NT 4.0 machine to see if they were using some type of ODBC connector??