Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to Access DB on Remote Server

Status
Not open for further replies.
Jan 26, 2001
45
0
0
US
Hi
I wonder if anyone can help me with a problem I have. We currently use a maintenance software package which is built on an access db and i want to be able to run some reports in ASP.Net to display on the company intranet. The problem is the db is held on a different server to the intranet. The db server has no IIS and is just a basic server.

I am using the following code to access the db just running a simple SQL select and am hitting the error at the bottom of this post, any help would be gratefully received. I can get this to work if I move the db to the webserver but that is not the way I need it to work - can anyone help?

Thanks

Andrew

FROM WEB.CONFIG

<add key="FrontLine" value="Driver={Microsoft Access Driver (*.mdb)}; Dbq=\\SERVERNAME\WINFLTEST\FLMaster.mdb; Uid=SUPERVISOR; Pwd=" />

FROM ASPX.VB

Public Class chFrontline
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim conn As Odbc.OdbcConnection
'Dim conn As OleDb.OleDbConnection
Dim daTest As Odbc.OdbcDataAdapter
'Dim daTest As OleDb.OleDbDataAdapter
conn = New Odbc.OdbcConnection(ConfigurationSettings.AppSettings("FrontLine"))
'conn = New OleDb.OleDbConnection(ConfigurationSettings.AppSettings("FrontLine"))
daTest = New Odbc.OdbcDataAdapter("Select * from Budget", conn)
'daTest = New OleDb.OleDbDataAdapter("Select * From Budget", conn)
Dim dsTest As New DataSet
daTest.Fill(dsTest, "Test")
DataGrid1.DataSource = dsTest.Tables("Test").DefaultView
DataGrid1.DataBind()
End If
End Sub


[COLOR=red yellow]ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xee0 Thread 0x2b4 DBC 0x40eda5c Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xee0 Thread 0x2b4 DBC 0x40eda5c Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xee0 Thread 0x2b4 DBC 0x40eda5c Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xee0 Thread 0x2b4 DBC 0x40eda5c Jet'. ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. [/color]


Andrew Westgarth
Web Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top