Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread I don't understand..
Mon, Nov 5 2018 6:59 PMPermanent Link

Ian Branch

Avatar

Hi Team,
   in my app I have the following code..
{code}
   DBS1.Execute('Update JobTickets set CreditNumb = ' + sJobNumber + ' where JobNo = ' + IntToStr(iCurrentJobNo));
{code}
   DBS1 being the TEDBSession.

   When this gets to run in the AfterPost event for JobTickets, I get the following error..

   "ElevateDB Error #700 An error was found in the statement at line 1 column 8 (ElevateDB Error #401. The table or view
JobTickets does not exist in the schema Default)"

   How can this be?

Regards,
Ian
Mon, Nov 5 2018 9:35 PMPermanent Link

Ian Branch

Avatar

I have implemented an EDBScript for now but I am still curious as to why it doesn't work.
Tue, Nov 6 2018 4:21 AMPermanent Link

Matthew Jones

Ian Branch wrote:

> DBS1 being the TEDBSession.

A while since I did this stuff, but it should be against the database, not the session surely?

--

Matthew Jones
Wed, Nov 7 2018 1:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ian,

<< How can this be? >>

The default database context for the TEDBSession.Execute method is the Configuration database.  So, you need to preface any table names in your DML SQL statements with the database name in order for them to work correctly.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Nov 7 2018 3:06 PMPermanent Link

Ian Branch

Avatar

Tim Young [Elevate Software] wrote:

> Ian,
>
> << How can this be? >>
>
> The default database context for the TEDBSession.Execute method is the Configuration database.  So, you need to
> preface any table names in your DML SQL statements with the database name in order for them to work correctly.
>
> Tim Young
> Elevate Software
> www.elevatesoft.com

Ah Ha!  Thanks Tim.
Image