Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Problems

Status
Not open for further replies.

GustavoAnaya

Programmer
Jul 30, 2002
4
AR
I'm working with VB6 and I find the following problem when I try to run a SQL query from VB code:

[Microsoft][ODBC Driver Manager]Driver does not support this parameter.

The SQL code is the following:

SELECT DISTINCT per.perapenom , Count(*) Cantidad FROM agexpoliza axp, empresas emp, personas per, planes pla, polplan plp, polizas pol
WHERE axp.axpvendedor = 'S'
AND axp.percodigo = per.percodigo
AND pol.polcodigo = axp.polcodigo
AND plp.polcodigo = pol.polcodigo
AND plp.placodigo = pla.placodigo
AND pol.empCodigo = emp.empCodigo
GROUP BY per.perapenom
ORDER BY 2,1

This query works well if I run it in MySql-Front program.

The ODBC driver version installed is 2.50.39. The OS version is Windows 98.

Anybody could help me?.

Thanks a lot.

Gustavo Anaya.
Argentina.

 
What is the clause "ORDER BY 2, 1" supposed to mean? ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
as i remember that is sort of alias for the second and first column returned

if you have query like "select column1, column2, column3 from table
order by column2"

you can change it to "select column1, column2, column3 from table
order by 2"

 
I was just wondering if that's what the ODBC driver was complaining about. ______________________________________________________________________
Never forget that we are
made of the stuff of stars
 
do you think the driver checks the query before sending it to server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top