473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

does anybody knows how should i correct this error?

This is the error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver][mysqld-4.1.13a-nt]No database selected

given after trying to browse to my login.asp. my DB is mysql & i have a
successful ODBC connection with it (i tested it). Should i choose a
database? where?
Above is the referenced code from which the error accurs (last line
causes the error):

Function OpenRS(SQLText)
Call OpenDBCon()
dim temp
set temp = Server.CreateObject("ADODB.RecordSet")
set temp.ActiveConnection = Conn
temp.CursorLocation = 3 'adUseClient
temp.CursorType = 0 'adOpenForwardOnly
temp.LockType = 1 ' adLockReadOnly
temp.source = SQLText
temp.open

Thanks.

Jan 5 '07 #1
1 1189
li*******@gmail.com wrote:
This is the error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver][mysqld-4.1.13a-nt]No database selected

given after trying to browse to my login.asp. my DB is mysql & i have
a successful ODBC connection with it (i tested it). Should i choose a
database? where?
Above is the referenced code from which the error accurs (last line
causes the error):

Function OpenRS(SQLText)
Call OpenDBCon()
dim temp
set temp = Server.CreateObject("ADODB.RecordSet")
set temp.ActiveConnection = Conn
temp.CursorLocation = 3 'adUseClient
temp.CursorType = 0 'adOpenForwardOnly
temp.LockType = 1 ' adLockReadOnly
temp.source = SQLText
temp.open

Thanks.
Show the code where you instantiate and open the Conn object. Also, add the
following line to this function, run the page and show us the result:

Function OpenRS(SQLText)
Call OpenDBCon()
dim temp
set temp = Server.CreateObject("ADODB.RecordSet")

'************************************************* *******
response.write typename(Conn) & "<BR>"
'************************************************* ********
set temp.ActiveConnection = Conn
temp.CursorLocation = 3 'adUseClient
temp.CursorType = 0 'adOpenForwardOnly

These are contradictory settings. The only type of cursor you will get if
you specify adUseClient is a static cursor (adOpenStatic). If you really
want a forward-only cursor, then simple use the defalt cursor:

Set temp = Conn.Execute(SQLText,,1) 'adCmdText

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jan 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
11
by: sgadag | last post by:
Even if "a" is NULL in the assignment below, this assignment does not cause any AV: SOME_PTR * someVar = (SOME_PTR *) a->b; But something like this will cause an AV because "someVar" is...
7
by: Damien | last post by:
Hi Guys, <Posted yesterday to microsoft.public.dotnet.framework.aspnet.security, but no responses garnered. For mpsc readers, this is a fairly common error encountered when connecting from...
12
by: JC | last post by:
Hi... Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error...
5
by: =?Utf-8?B?TWFydHluIEZld3RyZWxs?= | last post by:
From the amount of articles about this one I’m sure this gets asked a lot, but I haven’t yet found a succinct article which explains what is required in its entirety. I work using Visual...
19
by: Angus | last post by:
I have a socket class CTestClientSocket which I am using to simulate load testing. I create multiple instances of the client like this: for (int i = 0; i < 5; i++) { CTestClientSocket* pTemp...
45
by: Bob Altman | last post by:
This code (Visual Studio 2005) should generate a compilation warning to the effect that I'm accessing a shared member through an instance variable (the "color" variable): Private Sub X(ByVal...
1
by: jabbari | last post by:
Hello, Please Help us...! I have a big problem ,so i searched on google and other search engine ,then I realized that so many other people have the same problem and they, all, have'nt been able to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.