質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top