Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
QuestionSelection of custom control Pin
sachin414064-Dec-06 18:17
sachin414064-Dec-06 18:17 
QuestionRetrieving a connection String Pin
mohd imran abdul aziz4-Dec-06 18:11
mohd imran abdul aziz4-Dec-06 18:11 
GeneralRe: Retrieving a connection String Pin
Guffa4-Dec-06 18:33
Guffa4-Dec-06 18:33 
AnswerRe: Retrieving a connection String Pin
sanjaybs20014-Dec-06 19:26
sanjaybs20014-Dec-06 19:26 
QuestionRe:Windows Application for MDI and Child form using menu strip Pin
P.T.R.K4-Dec-06 17:59
P.T.R.K4-Dec-06 17:59 
QuestionError While opening c# project in VS 2005 Pin
JeganB4-Dec-06 17:34
JeganB4-Dec-06 17:34 
AnswerRe: Error While opening c# project in VS 2005 Pin
imshimshal6-Dec-06 19:18
imshimshal6-Dec-06 19:18 
QuestionDatabase Error Pin
mfcuser4-Dec-06 17:25
mfcuser4-Dec-06 17:25 
I tried to insert some value to a table, I received the following error

<br />
no value given for one or more required parameters<br />


Here is the code; the ID field is the primary key autoincremented, I don't know how to set it; I simply set it to 1

<br />
OleDbConnection dbConnection;<br />
<br />
            dbConnection = new OleDbConnection();<br />
<br />
            dbConnection.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; " +<br />
<br />
                "Data Source = " + Application.StartupPath + "\\Data.mdb";<br />
<br />
 <br />
<br />
            string sqlstr = "INSERT INTO Datas(ID, FirstName, LastName , Function, Description, SDate, EDate, THour)" +<br />
<br />
                            "VALUES(1, John, Do, FunctionOne, DescriptionOne, 12-02-03, 12-02-06, 20)";//dates are text<br />
<br />
 <br />
<br />
            OleDbCommand cmd = new OleDbCommand(sqlstr, dbConnection);<br />
<br />
 <br />
<br />
            try<br />
<br />
            {<br />
<br />
                dbConnection.Open();//open the database<br />
<br />
                cmd.ExecuteNonQuery();<br />
<br />
                dbConnection.Close();<br />
<br />
            }<br />
<br />
            catch (Exception ex)<br />
<br />
            {<br />
<br />
                MessageBox.Show(ex.Message, "Database Error");<br />
<br />
            }<br />
<br />

AnswerRe: Database Error Pin
JeganB4-Dec-06 18:01
JeganB4-Dec-06 18:01 
AnswerRe: Database Error Pin
Guffa4-Dec-06 18:28
Guffa4-Dec-06 18:28 
GeneralRe: Database Error Pin
mfcuser5-Dec-06 2:50
mfcuser5-Dec-06 2:50 
AnswerRe: Database Error Pin
sanjaybs20014-Dec-06 19:23
sanjaybs20014-Dec-06 19:23 
Questionhow to write the query to select 10 record from database Pin
Rmesh4-Dec-06 16:38
Rmesh4-Dec-06 16:38 
AnswerRe: how to write the query to select 10 record from database Pin
Not Active4-Dec-06 17:25
mentorNot Active4-Dec-06 17:25 
AnswerRe: how to write the query to select 10 record from database Pin
sanjaybs20014-Dec-06 18:14
sanjaybs20014-Dec-06 18:14 
GeneralRe: how to write the query to select 10 record from database Pin
Rmesh4-Dec-06 21:08
Rmesh4-Dec-06 21:08 
GeneralRe: how to write the query to select 10 record from database Pin
sanjaybs20015-Dec-06 2:09
sanjaybs20015-Dec-06 2:09 
GeneralRe: how to write the query to select 10 record from database Pin
sanjaybs20015-Dec-06 2:17
sanjaybs20015-Dec-06 2:17 
QuestionRegrding Listbox Pin
Rmesh4-Dec-06 16:27
Rmesh4-Dec-06 16:27 
AnswerRe: Regrding Listbox Pin
Stathread4-Dec-06 16:33
Stathread4-Dec-06 16:33 
GeneralRe: Regrding Listbox Pin
Rmesh4-Dec-06 16:39
Rmesh4-Dec-06 16:39 
GeneralRe: Regrding Listbox Pin
Rmesh4-Dec-06 16:43
Rmesh4-Dec-06 16:43 
GeneralRe: Regrding Listbox Pin
Stathread4-Dec-06 17:00
Stathread4-Dec-06 17:00 
GeneralRe: Regrding Listbox Pin
Rmesh4-Dec-06 23:20
Rmesh4-Dec-06 23:20 
QuestionGC-Like Slowdown Pin
Andrew Shapira4-Dec-06 15:09
Andrew Shapira4-Dec-06 15:09 

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.