Problem on INSERTING a record to database using typed datasets

  • Thread starter Thread starter Surya
  • Start date Start date
S

Surya

Dear All,
I have problem on inserting a record to database..Although it looked
easy.. i have caught up with following issue .. please go ahead and
help me to find solution

I Need to insert records to a data base,for which i am using Typed
dataSet.(I used DataSet Designer to create one)
Then created a table adapter in which i have written query for
INSERT , & set Database Direct property to true.(I didnt use a
seperate methods for INSERT,instead used inbuilt )

query......>INSERT INTO TABLE1 (NAME,CITY) VALUES (?,?)

Then in My .Vb file i called this method as
Adapter1.Insert("Value1",Value2").. before that
i used Adapter1.connection.open() and Adapter1.connection.close after
that insert ., explicitly.
For the Insert button coding...

Although it compiles and executes Fine .. record is not inserted.to
database Please clarify what I have been missing

I am using Visual studio 2005 & Access 2003

Thanks in advance,

Surya
 
Thanks Kerry, its working now ..as you said i was inserting or
updating local & not actual database file..
So i just modified the connection & its working..
and the Reference link you mentioned showed me where i was wrong
exactly
& am happy to get details at this earlier stage so that i stay
focussed more on basic things

Thanks a lot
Surya
 
Back
Top