Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Filling same SqlArray with different tables from database
Re: Filling same SqlArray with different tables from database [message #36231 is a reply to message #36205] Tue, 15 May 2012 07:07 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Nayana.
ayana wrote on Sat, 12 May 2012 09:13

Eventhough in second query there is no WHERE condition, its considering it and giving the error as follows,

Sql ERROR:
ORA-00904: "MRPID": invalid identifier

Error Statement:
select ITEM1, PARTY1, DUEDATE, QTY from DEMANDINFO where MRPID = ' '

How to set the same SqlArray with different query execution??


As error statement said, "there is WHERE condition", which you set for SqlArray before:
sqlIn.SetWhere(MRPID == " ");

To fix this error, you need to clear "WHERE" expression, e.g. with following source code:
sqlIn.SetWhere(true);

The second part of the source code with previous fix:
sqlIn.Reset();

sqlIn.SetTable(DEMANDINFO).AutoInsertId(true);
sqlIn.AddColumn(ITEM1 , "ItemId").Edit(edtItemid);
sqlIn.AddColumn(PARTY1, "PartyId").Edit (edtPartyID);
sqlIn.AddColumn(DUEDATE, "Date").Edit(edtDate);
sqlIn.AddColumn(QTY, "Qty").Edit(edtQty);
sqlIn.Appending().Removing();
sqlIn.SetWhere(true);

sqlIn.Query();
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MSSQL, default DB, datetime
Next Topic: Sql .sch / Date (moved)
Goto Forum:
  


Current Time: Sun May 12 12:36:17 CEST 2024

Total time taken to generate the page: 0.02072 seconds