 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
billaras Guest
|
Posted: Sun Apr 01, 2007 6:22 am Post subject: query in access |
|
|
im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks |
|
| Back to top |
|
 |
Vassiliev V. V. Guest
|
Posted: Sun Apr 01, 2007 1:36 pm Post subject: Re: query in access |
|
|
Access SQL used in ADO differs from SQL in Access itself. Correct syntax
should be ',' instead of ';' as column separator:
select a, b from peers where ab = 'a1'
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:460f0952 (AT) newsgroups (DOT) borland.com...
| Quote: | im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks
|
|
|
| Back to top |
|
 |
billaras Guest
|
Posted: Mon Apr 02, 2007 2:20 am Post subject: Re: query in access |
|
|
sorry i mistyped in my original post i used "," and it says the error,both
"," and ";" doesnt work with
ado and access 2007. is there a bug with the odbc drivers and access 2007?
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:460f6f6c$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Access SQL used in ADO differs from SQL in Access itself. Correct syntax
should be ',' instead of ';' as column separator:
select a, b from peers where ab = 'a1'
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:460f0952 (AT) newsgroups (DOT) borland.com...
im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks
|
|
|
| Back to top |
|
 |
Vassiliev V. V. Guest
|
Posted: Thu Apr 05, 2007 1:16 am Post subject: Re: query in access |
|
|
For Access and ADO it is better to use OLEDB provider for Access. Connection
string is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.mdb
However for Access 2007 database connection string is:
Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data
Source=C:\test.mdb.accdb
First provider (for Access 2003 and lower) in isntalled with most versions
of Windows and does not require MS Access, second one (for Access 2007)
requires MS Office 2007 installed on user's computer.
Sincerely yours,
Viatcheslav V. Vassiliev
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:46102211 (AT) newsgroups (DOT) borland.com...
| Quote: | sorry i mistyped in my original post i used "," and it says the error,both
"," and ";" doesnt work with
ado and access 2007. is there a bug with the odbc drivers and access 2007?
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:460f6f6c$1 (AT) newsgroups (DOT) borland.com...
Access SQL used in ADO differs from SQL in Access itself. Correct syntax
should be ',' instead of ';' as column separator:
select a, b from peers where ab = 'a1'
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:460f0952 (AT) newsgroups (DOT) borland.com...
im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks
|
|
|
| Back to top |
|
 |
billaras Guest
|
Posted: Thu Apr 05, 2007 3:25 am Post subject: Re: query in access |
|
|
i was connecting by using the odbc drivers, if i use the jet ole db it says
that there isnt installed isap...
if i select ace oledb i cant select the database that i want to open,(in the
next page of the ado )
do you believe that the drivers that i select to connect to a database might
play some role to why
some sql queries arent executed correctly?thks
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:46140804$1 (AT) newsgroups (DOT) borland.com...
| Quote: | For Access and ADO it is better to use OLEDB provider for Access.
Connection string is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.mdb
However for Access 2007 database connection string is:
Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data
Source=C:\test.mdb.accdb
First provider (for Access 2003 and lower) in isntalled with most versions
of Windows and does not require MS Access, second one (for Access 2007)
requires MS Office 2007 installed on user's computer.
Sincerely yours,
Viatcheslav V. Vassiliev
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:46102211 (AT) newsgroups (DOT) borland.com...
sorry i mistyped in my original post i used "," and it says the
error,both "," and ";" doesnt work with
ado and access 2007. is there a bug with the odbc drivers and access
2007?
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:460f6f6c$1 (AT) newsgroups (DOT) borland.com...
Access SQL used in ADO differs from SQL in Access itself. Correct syntax
should be ',' instead of ';' as column separator:
select a, b from peers where ab = 'a1'
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:460f0952 (AT) newsgroups (DOT) borland.com...
im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks
|
|
|
| Back to top |
|
 |
Vassiliev V. V. Guest
|
Posted: Thu Apr 05, 2007 1:08 pm Post subject: Re: query in access |
|
|
Access 2007 differs from previous versions. Microsoft.Jet.OLEDB.4.0 does not
work with it, it is likely (but I am not sure) that ODBC driver will not
too, at least while MS Office 2007 is not installed.
SQL for previous Access used in ADO differs from SQL used in Access itself.
For description of SQL used in ADO for Access (previous versions) look for
file:
C:\Program Files\Common Files\Microsoft Shared\OFFICEXX\YYYY\JETSQL40.CHM
where XX is Office version and YYYY is language ID.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:461425dd$1 (AT) newsgroups (DOT) borland.com...
| Quote: | i was connecting by using the odbc drivers, if i use the jet ole db it says
that there isnt installed isap...
if i select ace oledb i cant select the database that i want to open,(in
the next page of the ado )
do you believe that the drivers that i select to connect to a database
might play some role to why
some sql queries arent executed correctly?thks
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:46140804$1 (AT) newsgroups (DOT) borland.com...
For Access and ADO it is better to use OLEDB provider for Access.
Connection string is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.mdb
However for Access 2007 database connection string is:
Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data
Source=C:\test.mdb.accdb
First provider (for Access 2003 and lower) in isntalled with most
versions of Windows and does not require MS Access, second one (for
Access 2007) requires MS Office 2007 installed on user's computer.
Sincerely yours,
Viatcheslav V. Vassiliev
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:46102211 (AT) newsgroups (DOT) borland.com...
sorry i mistyped in my original post i used "," and it says the
error,both "," and ";" doesnt work with
ado and access 2007. is there a bug with the odbc drivers and access
2007?
"Vassiliev V. V." <support (AT) oledbdirect (DOT) com> wrote in message
news:460f6f6c$1 (AT) newsgroups (DOT) borland.com...
Access SQL used in ADO differs from SQL in Access itself. Correct
syntax should be ',' instead of ';' as column separator:
select a, b from peers where ab = 'a1'
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"billaras" <billaras1234 (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее: news:460f0952 (AT) newsgroups (DOT) borland.com...
im trying to run the following simple query through an adoquery in
borland c++ builder 2006(the borland developer studio)
ADOConnection1->Connected=true;
ADOQuery1->SQL->CommaText="SELECT a;b from peers where ab='a1'";
ADOQuery1->Active=true;
i get an error message saying operator missing between a and b....
if i run it through access it runs normaly.
i have connected the adoquery to an adoconnection and with odbc access
drivers to access database
any ideas?
thks
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|