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

C#

 
Generaldesign question Pin
monrobot1318-Jun-03 3:47
monrobot1318-Jun-03 3:47 
GeneralRe: design question Pin
KingTermite18-Jun-03 5:11
KingTermite18-Jun-03 5:11 
GeneralRe: design question Pin
monrobot1318-Jun-03 6:29
monrobot1318-Jun-03 6:29 
GeneralRe: design question Pin
Khang Nguyen18-Jun-03 5:38
Khang Nguyen18-Jun-03 5:38 
GeneralRe: design question Pin
monrobot1318-Jun-03 6:33
monrobot1318-Jun-03 6:33 
GeneralRe: design question Pin
Khang Nguyen18-Jun-03 7:11
Khang Nguyen18-Jun-03 7:11 
Generalalittle help please Pin
jphuphilly18-Jun-03 3:13
jphuphilly18-Jun-03 3:13 
GeneralRe: alittle help please Pin
Dimitris Iliopoulos18-Jun-03 5:28
Dimitris Iliopoulos18-Jun-03 5:28 
I haven't tried the code that i am going to write but i think it will work.
You want to store binary data in a db field if i guessed write, so:

<br />
System.IO.Filestream newf = System.IO.File.OpenRead(filename);<br />
byte[] data = new byte[newf.length];<br />
newf.Read(data,0,newf.length);<br />
<br />
<br />
<br />
<br />
//Dysplay array data in textbox<br />
for (i=0;i {<br />
TextBox1.Text += Data[i].ToString(); <br />
}<br />
<br />
//Create procedure parameter<br />
object[] obj = new object[1]; <br />
<br />
obj[0] = Data;<br />
<br />
//Execute the procedure with Microsoft.ApplicationBlocks.Data<br />
//Simple procedure<br />
/*CREATE PROCEDURE sp_img(@img image) AS<br />
<br />
insert into tb_img values(@img)*/<br />
<br />
//record data<br />
SqlHelper.ExecuteNonQuery(connectionString,"sp_img",obj); 


Try it i think it will work


From Greece:
Dimitris Iliopoulos
dimilio@yahoo.com
GeneralDatasets - performing selects Pin
MrEyes18-Jun-03 3:13
MrEyes18-Jun-03 3:13 
GeneralRe: Datasets - performing selects Pin
Oleksandr Kucherenko18-Jun-03 3:21
Oleksandr Kucherenko18-Jun-03 3:21 
GeneralRe: Datasets - performing selects Pin
MrEyes18-Jun-03 3:35
MrEyes18-Jun-03 3:35 
GeneralRe: Datasets - performing selects Pin
Dimitris Iliopoulos18-Jun-03 5:10
Dimitris Iliopoulos18-Jun-03 5:10 
GeneralRe: Datasets - performing selects Pin
Oleksandr Kucherenko18-Jun-03 3:26
Oleksandr Kucherenko18-Jun-03 3:26 
GeneralDatasets - Adding columns Pin
MrEyes18-Jun-03 2:03
MrEyes18-Jun-03 2:03 
GeneralRe: Datasets - Adding columns Pin
Oleksandr Kucherenko18-Jun-03 3:36
Oleksandr Kucherenko18-Jun-03 3:36 
GeneralRe: Datasets - Adding columns Pin
MrEyes18-Jun-03 4:17
MrEyes18-Jun-03 4:17 
GeneralRe: Datasets - Adding columns Pin
Oleksandr Kucherenko18-Jun-03 4:43
Oleksandr Kucherenko18-Jun-03 4:43 
GeneralRe: Datasets - Adding columns Pin
MrEyes18-Jun-03 4:50
MrEyes18-Jun-03 4:50 
GeneralRe: Datasets - Adding columns Pin
MrEyes18-Jun-03 5:21
MrEyes18-Jun-03 5:21 
GeneralMultiple Events Pin
Anonymous18-Jun-03 0:52
Anonymous18-Jun-03 0:52 
GeneralListView Column Resize Pin
somanath17-Jun-03 23:44
somanath17-Jun-03 23:44 
GeneralSmtpMail.Send exception Pin
EnkelIk17-Jun-03 23:16
EnkelIk17-Jun-03 23:16 
GeneralRe: SmtpMail.Send exception Pin
EnkelIk18-Jun-03 0:53
EnkelIk18-Jun-03 0:53 
GeneralRe: SmtpMail.Send exception Pin
EnkelIk18-Jun-03 1:43
EnkelIk18-Jun-03 1:43 
GeneralRe: SmtpMail.Send exception Pin
EnkelIk18-Jun-03 21:39
EnkelIk18-Jun-03 21:39 

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.