Click here to Skip to main content
16,013,824 members
Home / Discussions / Database
   

Database

 
QuestionADo.Net Confuse Pin
Amit Kumar G21-May-07 13:20
Amit Kumar G21-May-07 13:20 
AnswerRe: ADo.Net Confuse Pin
Sathesh Sakthivel21-May-07 15:37
Sathesh Sakthivel21-May-07 15:37 
GeneralRe: ADo.Net Confuse Pin
Amit Kumar G21-May-07 16:10
Amit Kumar G21-May-07 16:10 
QuestionSQL and Progress Updates Pin
Expert Coming21-May-07 12:54
Expert Coming21-May-07 12:54 
AnswerRe: SQL and Progress Updates Pin
Dave Kreskowiak21-May-07 13:29
mveDave Kreskowiak21-May-07 13:29 
GeneralRe: SQL and Progress Updates Pin
Expert Coming21-May-07 20:38
Expert Coming21-May-07 20:38 
GeneralRe: SQL and Progress Updates Pin
Dave Kreskowiak22-May-07 12:01
mveDave Kreskowiak22-May-07 12:01 
GeneralRe: SQL and Progress Updates Pin
Expert Coming22-May-07 20:02
Expert Coming22-May-07 20:02 
			string szSQLCommand1;<br />
            string szSQLCommand2;<br />
			Int32 intFileSize;<br />
			byte[] rawData;<br />
			FileStream fsRead;<br />
<br />
			try<br />
			{<br />
				fsRead = new FileStream(lblPath.Text, FileMode.Open, FileAccess.Read);<br />
				intFileSize = Convert.ToInt32(fsRead.Length);<br />
<br />
				rawData = new byte[intFileSize];<br />
				fsRead.Read(rawData, 0, intFileSize);<br />
				fsRead.Close();<br />
<br />
                mySQLConnection.Open();<br />
                <br />
                szSQLCommand1 = "INSERT INTO Files(Name, Size) VALUES(@Name, @Size)";<br />
                szSQLCommand2 = "INSERT INTO FileData(Data) VALUES(@Data)";<br />
<br />
				cmd.Connection = mySQLConnection;<br />
				cmd.CommandText = szSQLCommand1;<br />
				cmd.Parameters.AddWithValue("@Name", txtName.Text);<br />
                cmd.Parameters.AddWithValue("@Size", intFileSize);<br />
<br />
                cmd2.Connection = mySQLConnection;<br />
                cmd2.CommandText = szSQLCommand2;<br />
                cmd2.Parameters.AddWithValue("@Data", rawData);<br />
<br />
				cmd.ExecuteNonQuery();<br />
                cmd2.ExecuteNonQuery();<br />
<br />
				MessageBox.Show("File Inserted into database successfully!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);<br />
<br />
				mySQLConnection.Close();


The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.

GeneralRe: SQL and Progress Updates Pin
Dave Kreskowiak23-May-07 15:39
mveDave Kreskowiak23-May-07 15:39 
QuestionCalling SQL updates from Command Prompt Pin
Pualee21-May-07 11:41
Pualee21-May-07 11:41 
AnswerRe: Calling SQL updates from Command Prompt Pin
mr_lasseter22-May-07 7:18
mr_lasseter22-May-07 7:18 
GeneralRe: Calling SQL updates from Command Prompt Pin
Pualee23-May-07 2:37
Pualee23-May-07 2:37 
QuestionHow to add a table to a database of an SQLServer (in C#) Pin
Leia201121-May-07 4:27
Leia201121-May-07 4:27 
AnswerRe: How to add a table to a database of an SQLServer (in C#) Pin
Colin Angus Mackay21-May-07 5:22
Colin Angus Mackay21-May-07 5:22 
QuestionRun Sql jobs in sequence Pin
Aaanand21-May-07 4:21
Aaanand21-May-07 4:21 
AnswerRe: Run Sql jobs in sequence Pin
andyharman21-May-07 8:09
professionalandyharman21-May-07 8:09 
QuestionSQL 2005 Report Services Pin
Jonathan Snyder21-May-07 4:13
Jonathan Snyder21-May-07 4:13 
Questionindex Pin
WhiteGirl2321-May-07 2:50
WhiteGirl2321-May-07 2:50 
AnswerRe: Finding indexes on an MS-Access table Pin
andyharman21-May-07 3:25
professionalandyharman21-May-07 3:25 
QuestionHow to insert a binary file into SQL database, via ADO Pin
lilnelse21-May-07 2:16
lilnelse21-May-07 2:16 
AnswerRe: How to insert a binary file into SQL database, via ADO Pin
Sathesh Sakthivel21-May-07 2:37
Sathesh Sakthivel21-May-07 2:37 
GeneralRe: How to insert a binary file into SQL database, via ADO Pin
lilnelse21-May-07 2:57
lilnelse21-May-07 2:57 
GeneralRe: How to insert a binary file into SQL database, via ADO Pin
lilnelse21-May-07 3:05
lilnelse21-May-07 3:05 
GeneralRe: How to insert a binary file into SQL database, via ADO Pin
lilnelse21-May-07 17:02
lilnelse21-May-07 17:02 
QuestionOptimizing crystal report Pin
Pradip Kishore21-May-07 1:36
Pradip Kishore21-May-07 1:36 

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.