How to execute a Transform SQL Query?

H

Hailstorm

I try to use a data adapter to fill a dataset with a transform sql query
from ms access database.
The query string works at ms access's query area but when I run the asp.net
application, this error occures : "There is a syntax error near TRANSFORM
...." (error is in Turkish language so maybe this is not the exact
translation).


Isn't it possible to run TRANSFORM queries at ADO.Net? My querystring is :


strQuery= "TRANSFORM iif(Count(records.isPaid) is null,
0,Count(records.isPaid)) AS PaymentCount"
strQuery &= " SELECT records.paymentGroupID, records.explanation,
Count(records.paymentGroupID) AS TotalPaymentCount, MAX(paymentDate) AS
LastPaymentDate"
strQuery &= " FROM(records)"
strQuery &= " WHERE(records.paymentGroupID <> 0)"
strQuery &= " GROUP BY records.paymentGroupID, records.explanation"
strQuery &= " PIVOT records.isPaid;"
 
V

Val Mazur

Hi,

It should work in a case if Jet OLEDB provider recognized TRANSFORM as a
valid SQL syntax. I have never tried to do this from the front end, but I
think it will work. If not, then you could store your query as a stored
procedure in a Access database and call this SP. It will work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top