Question

In the past few days, I've read probably any related question with the specific error. Unfortunately nothing helped.

This and that links seems to be the same issues, but it seems that is not my problem. I'm using asp-classic and my code is:

sql="SELECT * FROM dbtable"

set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\dbname.mdf"
set rs=Server.CreateObject("ADODB.recordset")
rs.Open sql,conn

From all the search that I've made, it seems like I'm having some kind of security problem. So please help. If you have any questions feel free to ask.

Was it helpful?

Solution

Try moving the database to a public location and update your connection string to point at the new location, ie:

    c:\temp\database.mdb 
    conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\temp\dbname.mdf"

See if that works first, second make sure the database is not in use currently by another process/application.

--Invalid database Type--

Use SQL Compact edition, check the following Stack Overflow answer for more information: Answer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top