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
Filling same SqlArray with different tables from database [message #36205] Sat, 12 May 2012 09:13 Go to previous message
ayana is currently offline  ayana
Messages: 16
Registered: November 2011
Promising Member
Hi ,



For the first time the data has to come from the table DEMANDINSERT with the following attributes n fill the SqlArray sqlIn.

sqlIn.SetTable ( DEMANDINSERT );

sqlIn.AddColumn ( ITEMID , "ItemId" );
sqlIn.AddColumn ( PARTYID, "PartyId" );
sqlIn.AddColumn ( PARTYNAME, "PartyName" );
sqlIn.AddColumn ( ORDERDATE, "OrderDate" );
sqlIn.AddColumn ( ORDERQTY, "OrderQty" );
sqlIn.AddColumn ( NOOFDAYS, "NoOfDays" );
sqlIn.AddColumn("Shifted Dates");
sqlIn.Appending().Removing();
sqlIn.SetWhere ( MRPID == " " );

sqlIn.Query();


Now ,after a button click the data has to come from the DEMANDINFO table and which has to reset the same SqlArray sqlIn.
the table is as follows,

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.Query();


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??


Regards,

Nayana


 
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 Apr 28 01:18:32 CEST 2024

Total time taken to generate the page: 0.06149 seconds