Click here to Skip to main content
15,886,689 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: get object's name Pin
Christian Graus1-Feb-07 9:22
protectorChristian Graus1-Feb-07 9:22 
GeneralRe: get object's name Pin
Marc Soleda1-Feb-07 20:36
Marc Soleda1-Feb-07 20:36 
GeneralRe: get object's name Pin
xstoneheartx1-Feb-07 0:36
xstoneheartx1-Feb-07 0:36 
AnswerRe: get object's name Pin
Guffa1-Feb-07 9:31
Guffa1-Feb-07 9:31 
GeneralRe: get object's name Pin
Marc Soleda1-Feb-07 20:39
Marc Soleda1-Feb-07 20:39 
AnswerRe: get object's name Pin
Johan Hakkesteegt1-Feb-07 1:29
Johan Hakkesteegt1-Feb-07 1:29 
GeneralRe: get object's name Pin
Marc Soleda1-Feb-07 2:58
Marc Soleda1-Feb-07 2:58 
Questioninserting and retrieving image from sqlserver2000 using vb.net Pin
Dotnetkanna31-Jan-07 23:42
Dotnetkanna31-Jan-07 23:42 
Hi,
I dont know how to insert and retrive the image from the sqlserver2000 by using vb.net..im having the coding of c sharp.net but i dont know how to convert into vb.net, could anybody help me plz..

C sharp coding as follows for insertion and retrival...



private void BUpload_Click(object sender, System.EventArgs e)
{
// Create a byte[] from the input file
int len=FUpload.PostedFile.ContentLength;
byte[] pic = new byte[len];
FUpload.PostedFile.InputStream.Read(pic,0,len);
try
{
connection.Open ();
SqlCommand cmd = new SqlCommand ("insert into img "
+ "(bImg) values (@bImg)", connection);
cmd.Parameters.Add ("@bImg", pic);
cmd.ExecuteNonQuery ();
}
finally
{
connection.Close ();
}
}


==================

private void BShow_Click(object sender, System.EventArgs e)
{

MemoryStream stream = new MemoryStream ();

try
{
connection.Open ();
SqlCommand command = new
SqlCommand ("select bImg from img", connection);
byte[] image = (byte[]) command.ExecuteScalar ();
stream.Write (image, 0, image.Length);
Bitmap bitmap = new Bitmap (stream);
Response.ContentType = "image/jpeg";
bitmap.Save (Response.OutputStream, ImageFormat.Jpeg);
}
finally
{
connection.Close ();
stream.Close ();
}
}
=======================
i need this coding into vb.net help me plz......

regards
Kanna...
AnswerRe: inserting and retrieving image from sqlserver2000 using vb.net Pin
xstoneheartx31-Jan-07 23:58
xstoneheartx31-Jan-07 23:58 
Questionsystem.windows,input class not available Pin
bony_baba31-Jan-07 23:02
bony_baba31-Jan-07 23:02 
QuestionCreating barcode Generating program Pin
abhilash.asokan31-Jan-07 22:48
abhilash.asokan31-Jan-07 22:48 
AnswerRe: Creating barcode Generating program Pin
xstoneheartx1-Feb-07 0:22
xstoneheartx1-Feb-07 0:22 
AnswerRe: Creating barcode Generating program Pin
MatthysDT1-Feb-07 1:26
MatthysDT1-Feb-07 1:26 
QuestionCustom message box Pin
Dave McCool31-Jan-07 22:10
Dave McCool31-Jan-07 22:10 
AnswerRe: Custom message box Pin
Christian Graus31-Jan-07 22:21
protectorChristian Graus31-Jan-07 22:21 
QuestionBindingSource.EndEdit [modified] - Why is no-one answering my thread, i want to cry!! Pin
MatthysDT31-Jan-07 21:18
MatthysDT31-Jan-07 21:18 
QuestionVS 2005, Crystal reports replaces chars when exporting to PDF. Pin
Jaggernaut31-Jan-07 20:28
Jaggernaut31-Jan-07 20:28 
QuestionHow to pass parameter from one asp application to another Pin
manasram31-Jan-07 20:25
manasram31-Jan-07 20:25 
AnswerRe: How to pass parameter from one asp application to another Pin
Christian Graus31-Jan-07 22:22
protectorChristian Graus31-Jan-07 22:22 
AnswerRe: How to pass parameter from one asp application to another Pin
shreekar31-Jan-07 23:56
shreekar31-Jan-07 23:56 
GeneralRe: How to pass parameter from one asp application to another Pin
Christian Graus1-Feb-07 0:18
protectorChristian Graus1-Feb-07 0:18 
GeneralRe: How to pass parameter from one asp application to another Pin
shreekar1-Feb-07 0:26
shreekar1-Feb-07 0:26 
Questionsearching through a datagridview by searching on what the user types Pin
steve_rm31-Jan-07 15:48
steve_rm31-Jan-07 15:48 
AnswerRe: searching through a datagridview by searching on what the user types Pin
priya_p23331-Jan-07 16:16
priya_p23331-Jan-07 16:16 
AnswerRe: searching through a datagridview by searching on what the user types Pin
steve_rm31-Jan-07 20:54
steve_rm31-Jan-07 20:54 

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.