Mandarina Portokalli
Mandarina Portokalli

Reputation: 111

Insert from TableAdapter

I have to insert from winform in database access,

INSERT INTO Artikulli
             (Artikulli, Sasia, Cmimi, BID)
VALUES        (?, ?, ?, ?)

What I need to write in ( ?,?,?,?) , I am connecting with db Access ?

Upvotes: 0

Views: 141

Answers (3)

roybalderama
roybalderama

Reputation: 1640

If you are referring with Insert values using TableAdapter, check this Phonon answer to handle this. Best of luck!

Upvotes: 0

Freelancer
Freelancer

Reputation: 9074

You dont have to write any thing replacing ?.

You will have to pass parameters.

Eg.

cmd=new SqlCommand("insert into.....");

cmd.Parameters.Add("@Artikulli", SqlDbType.Int).Value = Artikulli;

command.ExecuteNonQuery();

Upvotes: 1

Hauns TM
Hauns TM

Reputation: 1959

A quick Google search gave this: How to: Insert New Records into a Database. MSDN descripbes how tableadapters works in common. There is a simple example too!

Upvotes: 0

Related Questions