Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Update exsisting Record
Tue, Oct 24 2006 8:07 AMPermanent Link

Sharma
Hi my name is Sharma
I am a new comer to DBIsam. Please forgive me if i am making a mistake in the logic.
All i am trying to do is, update the existing record where Client_Number  equal to the Client_Number  (This is a Auto incremental field and begins with 1000)

Update tblclient
SET [Business = Business, Client_FirstName= Client_FirstName,  Client_Number=Client_Number,  Client_SurName=Client_SurName,  Client_Address=Client_Address,
Client_Street=Client_Street,  Client_Locality=Client_Locality,  Client_County=Client_County, Client_Postcode=Client_Postcode,  Client_Web=Client_Web,
Correspondent_Name=Correspondent_Name, Correspondent_Tel =Correspondent_Tel , Correspondent_Fax=Correspondent_Fax, Correspondent_Mob
=Correspondent_Mob]
From tblclient
Where Client_Number  = Client_Number ;

i am getting a error message saying 'Error creating table handle'

Many thanks in advance and really appreciate your help.
sharma
Tue, Oct 24 2006 9:17 AMPermanent Link

"Robert"
Hmm, you seem to be updating each record with its own data. Why?

As to the error you get, do a Query.ExecSQL instead of a Query.Open

Robert

"Sharma" <sharma@cglloyds.co.uk> wrote in message
news:140246C3-D97F-4ED9-8A86-B83A621DDAE2@news.elevatesoft.com...
> Hi my name is Sharma
> I am a new comer to DBIsam. Please forgive me if i am making a mistake in
> the logic.
> All i am trying to do is, update the existing record where Client_Number
> equal to the Client_Number  (This is a Auto incremental field and begins
> with 1000)
>
> Update tblclient
> SET [Business = Business, Client_FirstName= Client_FirstName,
> Client_Number=Client_Number,  Client_SurName=Client_SurName,
> Client_Address=Client_Address,
> Client_Street=Client_Street,  Client_Locality=Client_Locality,
> Client_County=Client_County, Client_Postcode=Client_Postcode,
> Client_Web=Client_Web,
> Correspondent_Name=Correspondent_Name, Correspondent_Tel
> =Correspondent_Tel , Correspondent_Fax=Correspondent_Fax,
> Correspondent_Mob
> =Correspondent_Mob]
> From tblclient
> Where Client_Number  = Client_Number ;
>
> i am getting a error message saying 'Error creating table handle'
>
> Many thanks in advance and really appreciate your help.
> sharma
>

Tue, Oct 24 2006 5:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Sharma,

<< I am a new comer to DBIsam. Please forgive me if i am making a mistake in
the logic. All i am trying to do is, update the existing record where
Client_Number  equal to the Client_Number  (This is a Auto incremental field
and begins with 1000) >>

Robert is correct, use the TDBISAMQuery.ExecSQL method instead of the Open
method.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Oct 24 2006 5:27 PMPermanent Link

"Malcolm"
Sharma

What happens if you remove the:

  From tblclient

But as Robert has said the update simply updates each
record with its own data.  What are you expecting the
update to do?

Malcolm
Image