using oracle with master/detail asp.net ?

L

Luqman

I have created a master/detail asp.net page using detailview control and
gridview control, out of which detailview is editable.

I have created a dataset using Oracle Connection and I want to display
Product Name Column besides its Product ID Column.

If I use a sub query as recommended by Microsoft in of Oracle in dataset, it
gives error.

Select productID,price,amount
(Select productName from Products
where productID=A.ProductID) ProductName
from Invoice A

However, if I run the same query using Sql Server, its acceptable by
Dataset, any idea please ?

Please note, I want this query so that I can generate Insert,Update
Statements to update the records, thats why I am not using the Joins.

Best Regards,

Luqman
 
L

Lenny

Select productID,price,amount
(Select productName from Products
where productID=A.ProductID) ProductName
from Invoice A


try this

Select productID,price,amount , (Select productName from Products
where productID=A.ProductID) as ProductName
from Invoice A


Lenny
 
L

Luqman

Your query gives following error, if I use Oracle.

Generated SELECT statement.
Error in SELECT clause: expression near 'SELECT',
Error in SELECT clause: expression near 'FROM',
Missing FROM clause.
Unable to parse query text.

However if I copy and paste the same query in Oracle Sql Plus, it runs
fantastic, I don't understand why Dataset not accepting it.
Even after typing the query in Dataset, it successfully runs in Query
Builder when I click on Execute Query Button.

Any idea please ?

Best Regards,

Luqman
 
L

Lenny

However if I copy and paste the same query in Oracle Sql Plus, it runs
fantastic, I don't understand why Dataset not accepting it.
Even after typing the query in Dataset, it successfully runs in Query
Builder when I click on Execute Query Button.

are you pasting the code into the gridview wizard ?
I had the same problem.
if it's this issue, paste a simple query in the wizard and then go into the
source code to edit it with your query.

Lenny
 
L

Luqman

Hi Lenny,

I am not using the gridview wizard, I dragged the table from Server Explorer
into Dataset Designer, right click on TableAdapter fill,getdata method,
click on configure and create the query.

I think oracle.net Provider is not supporting this type of query.

Best Regards,

Luqman
 
L

Lenny

I am not using the gridview wizard, I dragged the table from Server
Explorer
into Dataset Designer, right click on TableAdapter fill,getdata method,
click on configure and create the query.

I think oracle.net Provider is not supporting this type of query.

I do not use dataset and objectdatasource. I had some difficultes too with
oracle.
try to use sqldatasource instead of datset.
edit the selectcommand in sqldatasource with the complex sql.

Lenny
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top