IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> unable to select as no database found, Got error when select from database
astroboy
post 19. Aug 2008, 03:31
Post #1


new Member
*

Group: Members
Posts: 3
Joined: 19.08.2008
Member No.: 64
LV Version: 7.1
Zertifizierung: keine



Hi all. I have got problems.
I am not sure what the error means.

I am querying for a long list of serial numbers(distinct) based on the limit and date by dsecending order.

CODE
select t1.SN, t1.Batch, t1.Date from tester as t1
join (
select SN, max(Date) as maxdate from tester where Batch = "UPS BC-6NX0-30A-1" group by SN
) as t2 on t1.SN = t2.SN and
t1.Date = t2.maxdate order by t2.maxdate desc limit 25;


I got the error as below "

CODE
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [MySQL][ODBC 5.1 Driver][mysqld-5.0.45-community-nt]No database selected.  in ADOTool_ADO API.vi->ADOTool_Select Data.vi->test_usingSQL_ADO.vi
"

Any idea about this error?

When I tried using the same syntax in mySQL command line client and it works correctly

How?

regards
Clement
Attached File(s)
Attached File  test_usingSQL_ADO.vi ( 32.35K ) Number of downloads: 406
 
Go to the top of the page
 
+Quote Post
CB
post 19. Aug 2008, 07:15
Post #2


proven Member
****

Group: Administrators
Posts: 315
Joined: 16.10.2006
From: Düsseldorf
Member No.: 2
LV Version: current
Zertifizierung: CLA
LV User seit: 2001



I do not have much experience with the ADO-Tool and mySQL, but can it be, that you have not selected a database in the System- / File-DSN you are using? Maybe you have to add a statement like "use myDatabaseName" onec before sendig select statements?


--------------------
künstliche Intelligenz ist besser als natürliche Dummheit!
rotabench:rotierende Prüfstände nach dem Baukasten-Prinzip
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19.04.2024 - 06:48