|
-
Apr 12th, 2006, 03:19 AM
#1
Thread Starter
Lively Member
database error
Hi all.
I am having problem with my ASP code.
I couldnt figure out why the error occur since I am new in web programming.
Can u help me fix this prob?
Why the error occur?
The error is like below:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'USER-LZA0CD0651\IUSR_USER-LZA0CD0651'.
/rekod/frekod.asp, line 137
Below is the portion of my code.
VB Code:
Dim rsrekod
Dim rsrekod_numRows
Set rsrekod = Server.CreateObject("ADODB.Recordset")
rsrekod.ActiveConnection = MM_cuba_STRING 'line 137
rsrekod.Source = "SELECT * FROM dbo.trekod WHERE nokp = '" + Replace(rsrekod__MMColParam, "'", "''") + "'"
rsrekod.CursorType = 0
rsrekod.CursorLocation = 2
rsrekod.LockType = 1
rsrekod.Open()
rsrekod_numRows = 0
Thanks in advance.
-
Apr 12th, 2006, 03:27 AM
#2
Frenzied Member
Re: database error
is the variable named MM_cuba_STRING an adodb connection
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
-
Apr 12th, 2006, 03:40 AM
#3
Thread Starter
Lively Member
-
Apr 12th, 2006, 03:48 AM
#4
Frenzied Member
Re: database error
Are you using mysql database?
have you opened your connection before opening your recordset?
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
-
Apr 12th, 2006, 04:00 AM
#5
Thread Starter
Lively Member
-
Apr 12th, 2006, 04:34 AM
#6
Re: database error
Are you sure that the USER-LZA0CD0651\IUSR_USER-LZA0CD0651 has been added to the SQL Server User Groups?
Use [code] source code here[/code] tags when you post source code.
My Articles
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|