Click here to Skip to main content
15,903,362 members
Home / Discussions / Database
   

Database

 
GeneralRe: Stored procedure Pin
nitin_ion18-May-05 2:04
nitin_ion18-May-05 2:04 
GeneralRe: Stored procedure Pin
maka230318-May-05 2:13
maka230318-May-05 2:13 
Questionhow do i read date time from mysql? Pin
Sasuko17-May-05 13:12
Sasuko17-May-05 13:12 
AnswerRe: how do i read date time from mysql? Pin
Christian Graus17-May-05 13:44
protectorChristian Graus17-May-05 13:44 
GeneralRe: how do i read date time from mysql? Pin
Anonymous17-May-05 21:14
Anonymous17-May-05 21:14 
GeneralRe: how do i read date time from mysql? Pin
Sasuko18-May-05 2:40
Sasuko18-May-05 2:40 
GeneralRe: how do i read date time from mysql? Pin
Sasuko18-May-05 2:49
Sasuko18-May-05 2:49 
AnswerRe: how do i read date time from mysql? Pin
Luis Alonso Ramos17-May-05 21:18
Luis Alonso Ramos17-May-05 21:18 
Try using parametized queries. That will make you not have to deal with date formats, and also prevent SQL injection attacks.

This is an example the the OLE DB .NET provider. You'll have to search for mySQL, but definitely possible:
string sql = "SELECT * FROM Table WHERE ID = ?";
OleDbCommand cmd = new OleDbCommand(sql, conn);
cmd.Parameters.Add("ID", id);
using(OleDbDataReader rdr = cmd.ExecuteReader()) ..............
With OleDbCommand, you must supply all parameters in the order they appear in the query. In SqlCommand (for SQL Server) parameteres are named and you can supply them in any order. Check your docs for the mySQL data provider.

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralRe: how do i read date time from mysql? Pin
Colin Angus Mackay17-May-05 22:34
Colin Angus Mackay17-May-05 22:34 
GeneralRe: how do i read date time from mysql? Pin
Luis Alonso Ramos18-May-05 5:16
Luis Alonso Ramos18-May-05 5:16 
Generaldeleting question Pin
Sasuko17-May-05 8:06
Sasuko17-May-05 8:06 
GeneralRe: deleting question Pin
Sasuko17-May-05 8:16
Sasuko17-May-05 8:16 
GeneralRe: deleting question Pin
Colin Angus Mackay17-May-05 22:32
Colin Angus Mackay17-May-05 22:32 
GeneralRe: deleting question Pin
Anonymous17-May-05 22:40
Anonymous17-May-05 22:40 
GeneralRe: deleting question Pin
Luis Alonso Ramos18-May-05 5:22
Luis Alonso Ramos18-May-05 5:22 
GeneralRe: deleting question Pin
ravikim200118-May-05 19:50
ravikim200118-May-05 19:50 
GeneralRe: deleting question Pin
Colin Angus Mackay18-May-05 20:25
Colin Angus Mackay18-May-05 20:25 
Generalinsert picture Pin
rohollahabadan17-May-05 2:25
rohollahabadan17-May-05 2:25 
GeneralRe: insert picture Pin
rohollahabadan18-May-05 23:41
rohollahabadan18-May-05 23:41 
QuestionSecure on Lan?? Pin
Member 196994117-May-05 2:21
Member 196994117-May-05 2:21 
AnswerRe: Secure on Lan?? Pin
Colin Angus Mackay17-May-05 3:38
Colin Angus Mackay17-May-05 3:38 
GeneralYukon Vs 2000 Pin
Ashok_S17-May-05 2:16
Ashok_S17-May-05 2:16 
GeneralRe: Yukon Vs 2000 Pin
Christian Graus17-May-05 13:46
protectorChristian Graus17-May-05 13:46 
GeneralRe: Yukon Vs 2000 Pin
17-May-05 21:17
suss17-May-05 21:17 
GeneralRe: Yukon Vs 2000 Pin
Christian Graus18-May-05 12:35
protectorChristian Graus18-May-05 12:35 

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.