09/10/2018, 18:19
Mới học ASP mong được giúp đỡ
Mình mới học lập trình WEB bằng ASP gặp một số lỗi sau trong việc kết nối CSDL
mong các bạn giúp đỡ
Mình đã tạo một DSN trong Data Sources tên là "pub"
sau đó mình tạo kết nối đến bằng câu lệnh :
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DSN=pub"
Đầu tiên nó ra hộp thoại thông báo
JIT Debugging component registration is incorrect
Please repair the installation of the most recent version of Visual Studio .NET
or Remote Debugging components
Alternatively, excute the following command as an Administrator to manually
repair the JIT Debugging component registration :
"C:Program FilesCommon FilesMicrosoft SharedVS7debugvs7jit.exe"/RegServer
(Mình vừa cài VS .NET vừa cài VS 6.0 trên Win XP)
Sau đó nó ra trang html thông báo lỗi nội dung chính như sau
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'USRNAMEIUSR_USRNAME'.
/learn/ASP/example1.asp, line 23
(dòng 23 là : myConn.Open "DSN=pub")
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Page:
GET /learn/ASP/example1.asp
mong các bạn giúp đỡ
Mình đã tạo một DSN trong Data Sources tên là "pub"
sau đó mình tạo kết nối đến bằng câu lệnh :
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DSN=pub"
Đầu tiên nó ra hộp thoại thông báo
JIT Debugging component registration is incorrect
Please repair the installation of the most recent version of Visual Studio .NET
or Remote Debugging components
Alternatively, excute the following command as an Administrator to manually
repair the JIT Debugging component registration :
"C:Program FilesCommon FilesMicrosoft SharedVS7debugvs7jit.exe"/RegServer
(Mình vừa cài VS .NET vừa cài VS 6.0 trên Win XP)
Sau đó nó ra trang html thông báo lỗi nội dung chính như sau
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'USRNAMEIUSR_USRNAME'.
/learn/ASP/example1.asp, line 23
(dòng 23 là : myConn.Open "DSN=pub")
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Page:
GET /learn/ASP/example1.asp
Bài liên quan
VD: kết nối tới access:
Set conn=Server.CreateObject("ADODB.Connection")
strconn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\path\data.mdb"
conn.Open strconn
có lẽ nhanh hơn đấy
set objConn = Server.CreateObject("AĐOB.connection")
strConn = "provider=Microsoft.Jet.OLEDB.4.0 ; data source=duongdanCSDL"
objConn.open strConn