Click here to Skip to main content
15,891,607 members
Home / Discussions / Database
   

Database

 
GeneralAn exception caused by Primary Key Pin
sharonz24-Nov-04 1:59
sharonz24-Nov-04 1:59 
GeneralRe: An exception caused by Primary Key Pin
Colin Angus Mackay24-Nov-04 4:55
Colin Angus Mackay24-Nov-04 4:55 
GeneralAdd table, fields and records Pin
bouli23-Nov-04 17:05
bouli23-Nov-04 17:05 
GeneralRe: Add table, fields and records Pin
Colin Angus Mackay24-Nov-04 4:58
Colin Angus Mackay24-Nov-04 4:58 
Generalhelp Pin
Yulianto.23-Nov-04 15:43
Yulianto.23-Nov-04 15:43 
GeneralTime & DataGrid Pin
Mr.Cooper23-Nov-04 11:36
Mr.Cooper23-Nov-04 11:36 
GeneralRe: Time & DataGrid Pin
Mike Dimmick25-Nov-04 0:13
Mike Dimmick25-Nov-04 0:13 
GeneralFirst insert ignore adding records to Access Pin
PaleyX23-Nov-04 6:24
PaleyX23-Nov-04 6:24 
Using the following code the first insert is ignored so only the 'y' and 'z' rows appear in the table. The table is empty before any of the inserts. Anybody know why this is happening? Is there an easier way of getting data into a table?

		OleDbConnection cn = new OleDbConnection();<br />
			cn.ConnectionString = @"Provider=Microsoft.JET.OLEDB.4.0;" +<br />
				                  @"Data Source=" + sDBPath + ";" +<br />
								  @"Jet OLEDB:Engine Type=5";<br />
<br />
			cn.Open();<br />
			//<br />
			OleDbDataAdapter adap = new OleDbDataAdapter("SELECT * FROM Info",cn);<br />
			OleDbCommand cmdInsert = new OleDbCommand();<br />
			cmdInsert.Connection = cn;<br />
<br />
			cmdInsert.CommandText = @"INSERT INTO Info (InfoDesc, InfoVal) VALUES (?, ?)";<br />
			cmdInsert.Parameters.Add(new OleDbParameter("InfoDesc",OleDbType.VarWChar,50,"InfoDesc"));<br />
			cmdInsert.Parameters.Add(new OleDbParameter("InfoVal",OleDbType.VarWChar,50,"InfoVal"));<br />
			adap.InsertCommand = cmdInsert;<br />
<br />
			DataSet ds = new DataSet();<br />
			adap.Fill(ds,"Info");<br />
<br />
			DataRow dr = null;<br />
			dr = ds.Tables[0].NewRow();<br />
			dr["InfoDesc"] = "x";<br />
			dr["InfoVal"] = "x";<br />
			ds.Tables[0].Rows.Add(dr);<br />
			<br />
			dr = ds.Tables[0].NewRow();<br />
			dr["InfoDesc"] = "y";<br />
			dr["InfoVal"] = "y";<br />
			ds.Tables[0].Rows.Add(dr);<br />
		<br />
			dr = ds.Tables[0].NewRow();<br />
			dr["InfoDesc"] = "z";<br />
			dr["InfoVal"] = "z";<br />
			ds.Tables[0].Rows.Add(dr);<br />
<br />
			adap.Update(ds,"Info");<br />
			ds.Dispose();<br />
			//<br />
			cn.Close();>


Rugby League: The Greatest Game Of All.
GeneralRecords are not visible Pin
Member 177285223-Nov-04 0:56
Member 177285223-Nov-04 0:56 
GeneralRe: Records are not visible Pin
Steven Campbell23-Nov-04 6:45
Steven Campbell23-Nov-04 6:45 
GeneralSELECT query with COUNT of another table that may have no matching records Pin
Luis Alonso Ramos22-Nov-04 14:47
Luis Alonso Ramos22-Nov-04 14:47 
GeneralRe: SELECT query with COUNT of another table that may have no matching records Pin
Mike Dimmick23-Nov-04 2:05
Mike Dimmick23-Nov-04 2:05 
GeneralRe: SELECT query with COUNT of another table that may have no matching records Pin
Luis Alonso Ramos23-Nov-04 7:10
Luis Alonso Ramos23-Nov-04 7:10 
GeneralDuration Field !!!!!!!!! Pin
Mr.Cooper22-Nov-04 13:08
Mr.Cooper22-Nov-04 13:08 
GeneralRe: Duration Field !!!!!!!!! Pin
Christian Graus22-Nov-04 13:41
protectorChristian Graus22-Nov-04 13:41 
Generalconnection to table and display results to labels Pin
jlawren722-Nov-04 9:42
jlawren722-Nov-04 9:42 
GeneralmySQL++ API Pin
sweep12322-Nov-04 4:09
sweep12322-Nov-04 4:09 
GeneralRe: mySQL++ API Pin
David Salter25-Nov-04 22:49
David Salter25-Nov-04 22:49 
GeneralLogin details in the connection string Pin
hasanali0022-Nov-04 3:57
hasanali0022-Nov-04 3:57 
GeneralRe: Login details in the connection string Pin
Steve S22-Nov-04 4:03
Steve S22-Nov-04 4:03 
GeneralRe: Login details in the connection string Pin
hasanali0023-Nov-04 2:28
hasanali0023-Nov-04 2:28 
GeneralRe: Login details in the connection string Pin
Steve S23-Nov-04 5:34
Steve S23-Nov-04 5:34 
GeneralRe: Login details in the connection string Pin
CodeWell25-Nov-04 16:36
CodeWell25-Nov-04 16:36 
GeneralStrange SQL Query doesn't accept NULL Pin
Vector722-Nov-04 3:40
Vector722-Nov-04 3:40 
GeneralRe: Strange SQL Query doesn't accept NULL Pin
Steve S22-Nov-04 4:08
Steve S22-Nov-04 4:08 

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.