Click here to Skip to main content
15,910,981 members
Home / Discussions / Database
   

Database

 
GeneralRe: Data Parameters Pin
Bill Dean24-Feb-04 16:51
Bill Dean24-Feb-04 16:51 
GeneralRe: Data Parameters Pin
Robert Gronenthal24-Feb-04 16:56
Robert Gronenthal24-Feb-04 16:56 
GeneralRe: Data Parameters Pin
Bill Dean24-Feb-04 17:05
Bill Dean24-Feb-04 17:05 
QuestionCan you create tables from dataset/tables? Pin
Rebur24-Feb-04 14:14
sussRebur24-Feb-04 14:14 
AnswerRe: Can you create tables from dataset/tables? Pin
Not Active24-Feb-04 15:54
mentorNot Active24-Feb-04 15:54 
AnswerRe: Can you create tables from dataset/tables? Pin
RChin25-Feb-04 7:08
RChin25-Feb-04 7:08 
GeneralSimple question that is KILLING me!!! Pin
HarleyJase24-Feb-04 9:24
HarleyJase24-Feb-04 9:24 
GeneralRe: Simple question that is KILLING me!!! Pin
Edbert P24-Feb-04 11:28
Edbert P24-Feb-04 11:28 
You have to replace the myAdapter ?????????? line with these lines: Smile | :)

1. Set the InsertCommand of the data adapter.
SqlCommand cmd;
cmd = new SqlCommand("INSERT INTO tblMovies(MovieName, MovieGenre, Checkedout, PersonWhoChecked) " +
                       "VALUES (@MovieName, @MovieGenre, @Checkedout, @PersonWhoChecked)", sqlConnection1);
myAdapter.InsertCommand = cmd;


I don't think you need to add the parameters manually, as I'm using OleDbCommand and I can insert new records automatically.
However, if it doesn't work then you have to add the record using the parameter instead of adding the row, e.g.

cmd.Parameters.Add("@MovieName", SqlDbType.NChar, 50, "MovieName");
...

2. Update the database.
myAdapter.Update(myDataSet.Tables["tblMovies"]);


Voila! If I remember it correctly without using the DevEnv, it should work as intended. Poke tongue | ;-P
Read this link[^] to MSDN if you want to know more.

Edbert P.
Sydney, Australia.
GeneralRe: Simple question that is KILLING me!!! Pin
HarleyJase24-Feb-04 12:09
HarleyJase24-Feb-04 12:09 
GeneralRe: Simple question that is KILLING me!!! Pin
Edbert P24-Feb-04 17:34
Edbert P24-Feb-04 17:34 
GeneralRe: Simple question that is KILLING me!!! Pin
HarleyJase25-Feb-04 5:06
HarleyJase25-Feb-04 5:06 
GeneralRe: Simple question that is KILLING me!!! Pin
HarleyJase25-Feb-04 5:20
HarleyJase25-Feb-04 5:20 
GeneralRe: Simple question that is KILLING me!!! Pin
Edbert P25-Feb-04 11:37
Edbert P25-Feb-04 11:37 
GeneralRe: Simple question that is KILLING me!!! Pin
HarleyJase26-Feb-04 7:05
HarleyJase26-Feb-04 7:05 
GeneralRe: Simple question that is KILLING me!!! Pin
Edbert P26-Feb-04 11:01
Edbert P26-Feb-04 11:01 
GeneralSQL Server Stored Procedure Pagination Pin
Braulio Dez24-Feb-04 6:13
Braulio Dez24-Feb-04 6:13 
GeneralData type mismatch blues. Pin
Marypoppins23-Feb-04 22:39
Marypoppins23-Feb-04 22:39 
GeneralRe: Data type mismatch blues. Pin
Verdant12324-Feb-04 5:12
Verdant12324-Feb-04 5:12 
GeneralRe: Data type mismatch blues. Pin
Marypoppins24-Feb-04 18:52
Marypoppins24-Feb-04 18:52 
Generalconnect to web service Pin
arzu23-Feb-04 21:43
arzu23-Feb-04 21:43 
GeneralRe: connect to web service Pin
Verdant12324-Feb-04 5:08
Verdant12324-Feb-04 5:08 
Generalbase de donnée avec une classe en C++ Pin
MagicFans9122-Feb-04 23:24
MagicFans9122-Feb-04 23:24 
GeneralRe: base de donnée avec une classe en C++ Pin
Sarvesvara (BVKS) Dasa23-Feb-04 2:06
Sarvesvara (BVKS) Dasa23-Feb-04 2:06 
GeneralRe: base de donnée avec une classe en C++ Pin
Verdant12323-Feb-04 12:06
Verdant12323-Feb-04 12:06 
GeneralRe: base de donnée avec une classe en C++ Pin
maevava26-Apr-04 1:54
maevava26-Apr-04 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.