Access prefers that you use the full proper name of the columns as so:

select users.username, users.password from users

additionally, sometimes, depending on the odbc/ado/rdo/COM(+) method used,
you would need to use brackets:

select [users.username]

or 

select [users].[username]

if you've created a database in access, with tables and columns, etc, create
a simple query in the query wizard, then click to see the sql view - copy
the code to notepad (or favorite editor) and use that

if it doesn't work, try the various steps above

overall, though, even on Windows platforms, MySQL is a world better than
Access

I prefer it greatly and rarely use Access anymore - unless working for a
client whose virtual host allows only Access for database.



-----Original Message-----
From: Peter Verhas [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 2:23 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Database access 


As far as I could understand when experimenting with Access the SQL language
accepted by Access is limited. Thus you can not say

select username,password from users

All you can say instead is only

select * from users


Similarly select count(*) may also be forbidden.

I am not sure if your question was regarding such aproblem, but this may
really be an issue. I faced it when I tried to debug the ODBC module of
ScriptBasic using Access, but I have never read this in documentation.

Regards,
Peter

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Rafferty Uy
Sent: Friday, March 22, 2002 10:24 AM
To: ActivePerl Mailing List
Subject: Database access


Hello there,

How can I retrieve the data I got from my sql queries to my MS Access
Database?
If for example i queried

sql("select count(username) from users where username = " $strUsername);

how can i get the count value? and is my understanding of the sql() correct?
I can't understand the documentation very well

and how can i get the data if my sql query retrieves a table of data?

sql("select * from users");
or
sql("select username,password from users");

Thanks in advance

Rafferty

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to