Click here to Skip to main content
15,921,382 members
Home / Discussions / C#
   

C#

 
QuestionHow to read a exact line from .txt file Pin
CodeItWell4-Oct-06 23:47
CodeItWell4-Oct-06 23:47 
AnswerRe: How to read a exact line from .txt file Pin
Christian Graus5-Oct-06 0:56
protectorChristian Graus5-Oct-06 0:56 
QuestionDataGridView update to database fails Pin
Alex.Suelzle4-Oct-06 23:46
Alex.Suelzle4-Oct-06 23:46 
AnswerRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 1:22
topcatalpha5-Oct-06 1:22 
GeneralRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 20:21
Alex.Suelzle5-Oct-06 20:21 
GeneralRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 20:37
topcatalpha5-Oct-06 20:37 
GeneralRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 21:41
Alex.Suelzle5-Oct-06 21:41 
GeneralRe: DataGridView update to database fails Pin
topcatalpha5-Oct-06 21:48
topcatalpha5-Oct-06 21:48 
concerning the update is suggest not to use the cmdbuilder but do it yourself. it takes a little more time but your sure it's the way you want it..
just do the update using the key fields in the where clause..
Also autonumbering and datetime fields can cause problems in the where clause.

example :

WagonsAdapter.UpdateCommand = new OleDbCommand();
WagonsAdapter.UpdateCommand.Connection = connection;
WagonsAdapter.UpdateCommand.CommandText = "UPDATE Wagons SET Wag_Name = ?, Wag_Tag1 = ?, Wag_Tag2 = ?, Wag_Info = ?, Wag_Date = ?, Wag_Active = ?, Wag_RecordStatus = ? WHERE Wag_ID = ?";
WagonsAdapter.UpdateCommand.Parameters.Add("Name", OleDbType.VarWChar, 0, "Wag_Name");
WagonsAdapter.UpdateCommand.Parameters.Add("Tag1", OleDbType.Integer, 0, "Wag_Tag1");
WagonsAdapter.UpdateCommand.Parameters.Add("Tag2", OleDbType.Integer, 0, "Wag_Tag2");
WagonsAdapter.UpdateCommand.Parameters.Add("Info", OleDbType.VarWChar, 0, "Wag_Info");
WagonsAdapter.UpdateCommand.Parameters.Add("Date", OleDbType.Date, 0, "Wag_Date");
WagonsAdapter.UpdateCommand.Parameters.Add("Active", OleDbType.Boolean, 0, "Wag_Active");
WagonsAdapter.UpdateCommand.Parameters.Add("RecordStatus", OleDbType.Integer, 0, "Wag_RecordStatus");
WagonsAdapter.UpdateCommand.Parameters.Add("ID", OleDbType.Integer, 0, "Wag_ID");


this works fine... i also had the same problem using the cmdbuilder..

greetz.


AnswerRe: DataGridView update to database fails Pin
Alex.Suelzle5-Oct-06 22:42
Alex.Suelzle5-Oct-06 22:42 
QuestionEEException ?! Pin
Jon Hulatt4-Oct-06 23:37
Jon Hulatt4-Oct-06 23:37 
AnswerRe: EEException ?! Pin
Christian Graus5-Oct-06 1:03
protectorChristian Graus5-Oct-06 1:03 
GeneralRe: EEException ?! Pin
Jon Hulatt5-Oct-06 1:12
Jon Hulatt5-Oct-06 1:12 
GeneralRe: EEException ?! Pin
Christian Graus5-Oct-06 9:15
protectorChristian Graus5-Oct-06 9:15 
QuestionDll Security. Pin
subrata.jana4-Oct-06 23:33
subrata.jana4-Oct-06 23:33 
AnswerRe: Dll Security. Pin
aamironline5-Oct-06 0:29
aamironline5-Oct-06 0:29 
GeneralRe: Dll Security. Pin
subrata.jana5-Oct-06 0:55
subrata.jana5-Oct-06 0:55 
QuestionCustomising the SortedArray class Pin
Sreerag Gopinath4-Oct-06 23:21
Sreerag Gopinath4-Oct-06 23:21 
AnswerRe: Customising the SortedArray class Pin
Christian Graus5-Oct-06 1:05
protectorChristian Graus5-Oct-06 1:05 
QuestionC#, .NET 1.1 and the WS_DISABLED window style Pin
ssozonoff4-Oct-06 22:35
ssozonoff4-Oct-06 22:35 
Questiongettting table name Pin
saqib824-Oct-06 21:27
saqib824-Oct-06 21:27 
AnswerRe: gettting table name Pin
albCode4-Oct-06 21:40
albCode4-Oct-06 21:40 
GeneralRe: gettting table name Pin
saqib824-Oct-06 21:44
saqib824-Oct-06 21:44 
GeneralRe: gettting table name Pin
albCode4-Oct-06 21:59
albCode4-Oct-06 21:59 
GeneralRe: gettting table name Pin
saqib824-Oct-06 23:37
saqib824-Oct-06 23:37 
QuestionControl Input: Pin
Shahzad.Aslam4-Oct-06 20:34
Shahzad.Aslam4-Oct-06 20:34 

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.