Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file, then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click insert/add
button, it converts the image(jpeg) file to bytes[] and store it the database
with Image or VarBinary Datatype. While in retrieval, I get the specific
record, store the Image or VarBinary Data in local byte[] variable, and then
convert this to a image (jpeg) file and used the filepath to display file.
The problem still unable to display image and create image file. -
//Get Image Record Stored and display them
-
private void GetImageRecord()
-
{
-
if (CheckFields(2))
-
{
-
string sqlText = "Select * From PictureImages Where ImageName =
-
@ImgName";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
SqlDataReader dr = cmd.ExecuteReader();
-
string filePath = Request.PhysicalApplicationPath +
-
txtImgName.Text + ".jpg";
-
FileStream fs = new FileStream(filePath, FileMode.Create,
-
FileAccess.Write);
-
-
byte[] storedByte = null;
-
//byte storedByte = null;
-
//MemoryStream ms = new MemoryStream(storedByte);
-
//StreamWriter sw = new StreamWriter(filePath);
-
-
while (dr.Read())
-
{
-
lblImgNo.Text = dr["ImageNo"].ToString();
-
txtImgDesc.Text = dr["Description"].ToString();
-
txtImgUrl.Text = dr["ImageUrl"].ToString();
-
storedByte = (byte[])dr["ImageData"];
-
//long lRes = dr.GetBytes(5,0,storedByte,0,100);
-
}
-
MemoryStream ms = new MemoryStream(storedByte, 0,
-
storedByte.Length);
-
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
- <<--- Error Occurred Here
-
System.Drawing.Image otherImg = img.GetThumbnailImage(100, 100,
-
null, new IntPtr());
-
//otherImg.Save(ms, img.RawFormat);
-
otherImg.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
-
-
//byte[] byteImg = new byte[ms.Length];
-
//ms.Position = 0;
-
//ms.Read(byteImg, 0, byteImg.Length);
-
-
//System.Drawing.Image img = System.Drawing.Image.FromStream(new
-
MemoryStream(storedByte, 0, storedByte.Length));
-
//img.Save(filePath);
-
-
//fs.Write(storedByte, 0, storedByte.Length);
-
//fs.Flush();
-
//fs.Close();
-
if (File.Exists(filePath))
-
PicImg2.ImageUrl = filePath;
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
}
-
}
-
-
private void InsertProcess()
-
{
-
if (CheckFields(1))
-
{
-
FileStream fs = new
-
FileStream(txtImgFile.Text.Trim(),FileMode.OpenOrCreate,FileAccess.Read);
-
-
byte[] imgByte = new byte[fs.Length];
-
fs.Read(imgByte,0,(int)fs.Length);
-
fs.Close();
-
//Testing storing image as binary in database
-
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText,conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
int iRes = cmd.ExecuteNonQuery();
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
-
private void InsertProcess2()
-
{
-
if (CheckFields(0))
-
{
-
HttpPostedFile imgFile = txtFile1.PostedFile;
-
int imgLen = imgFile.ContentLength;
-
string imgType = imgFile.ContentType;
-
byte[] imgByte = new byte[imgLen];
-
imgFile.InputStream.Read(imgByte, 0, imgLen);
-
-
//Testing storing image as binary in database
-
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
int iRes = cmd.ExecuteNonQuery();
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
Anyone?
Thanks in Advanced...
den2005
--
MCP Year 2005, Philippines 3 5218
Hi Den,
just wanted to know why you store the images as such in the database.
I believe, it is recommended to save images in file system and store the
filepaths in database rather than storing the entire image in database.
Augustin
"den 2005" wrote:
Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file, then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click insert/add
button, it converts the image(jpeg) file to bytes[] and store it the database
with Image or VarBinary Datatype. While in retrieval, I get the specific
record, store the Image or VarBinary Data in local byte[] variable, and then
convert this to a image (jpeg) file and used the filepath to display file.
The problem still unable to display image and create image file.
-
//Get Image Record Stored and display them
-
private void GetImageRecord()
-
{
-
if (CheckFields(2))
-
{
-
string sqlText = "Select * From PictureImages Where ImageName =
-
@ImgName";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
SqlDataReader dr = cmd.ExecuteReader();
-
string filePath = Request.PhysicalApplicationPath +
-
txtImgName.Text + ".jpg";
-
FileStream fs = new FileStream(filePath, FileMode.Create,
-
FileAccess.Write);
-
byte[] storedByte = null;
-
//byte storedByte = null;
-
//MemoryStream ms = new MemoryStream(storedByte);
-
//StreamWriter sw = new StreamWriter(filePath);
-
while (dr.Read())
-
{
-
lblImgNo.Text = dr["ImageNo"].ToString();
-
txtImgDesc.Text = dr["Description"].ToString();
-
txtImgUrl.Text = dr["ImageUrl"].ToString();
-
storedByte = (byte[])dr["ImageData"];
-
//long lRes = dr.GetBytes(5,0,storedByte,0,100);
-
}
-
MemoryStream ms = new MemoryStream(storedByte, 0,
-
storedByte.Length);
-
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
- <<--- Error Occurred Here
-
System.Drawing.Image otherImg = img.GetThumbnailImage(100, 100,
-
null, new IntPtr());
-
//otherImg.Save(ms, img.RawFormat);
-
otherImg.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
-
//byte[] byteImg = new byte[ms.Length];
-
//ms.Position = 0;
-
//ms.Read(byteImg, 0, byteImg.Length);
-
//System.Drawing.Image img = System.Drawing.Image.FromStream(new
-
MemoryStream(storedByte, 0, storedByte.Length));
-
//img.Save(filePath);
-
//fs.Write(storedByte, 0, storedByte.Length);
-
//fs.Flush();
-
//fs.Close();
-
if (File.Exists(filePath))
-
PicImg2.ImageUrl = filePath;
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
}
-
}
-
private void InsertProcess()
-
{
-
if (CheckFields(1))
-
{
-
FileStream fs = new
-
FileStream(txtImgFile.Text.Trim(),FileMode.OpenOrCreate,FileAccess.Read);
-
byte[] imgByte = new byte[fs.Length];
-
fs.Read(imgByte,0,(int)fs.Length);
-
fs.Close();
-
//Testing storing image as binary in database
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText,conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
int iRes = cmd.ExecuteNonQuery();
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
private void InsertProcess2()
-
{
-
if (CheckFields(0))
-
{
-
HttpPostedFile imgFile = txtFile1.PostedFile;
-
int imgLen = imgFile.ContentLength;
-
string imgType = imgFile.ContentType;
-
byte[] imgByte = new byte[imgLen];
-
imgFile.InputStream.Read(imgByte, 0, imgLen);
-
//Testing storing image as binary in database
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
int iRes = cmd.ExecuteNonQuery();
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
Anyone?
Thanks in Advanced...
den2005
--
MCP Year 2005, Philippines
This article should be of help.. http://www.netomatix.com/development...splayBlob.aspx
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file,
then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click
insert/add
button, it converts the image(jpeg) file to bytes[] and store it the
database
with Image or VarBinary Datatype. While in retrieval, I get the specific
record, store the Image or VarBinary Data in local byte[] variable, and
then
convert this to a image (jpeg) file and used the filepath to display file.
The problem still unable to display image and create image file.
-
//Get Image Record Stored and display them
-
private void GetImageRecord()
-
{
-
if (CheckFields(2))
-
{
-
string sqlText = "Select * From PictureImages Where ImageName =
-
@ImgName";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
SqlDataReader dr = cmd.ExecuteReader();
-
string filePath = Request.PhysicalApplicationPath +
-
txtImgName.Text + ".jpg";
-
FileStream fs = new FileStream(filePath, FileMode.Create,
-
FileAccess.Write);
-
byte[] storedByte = null;
-
//byte storedByte = null;
-
//MemoryStream ms = new MemoryStream(storedByte);
-
//StreamWriter sw = new StreamWriter(filePath);
-
while (dr.Read())
-
{
-
lblImgNo.Text = dr["ImageNo"].ToString();
-
txtImgDesc.Text = dr["Description"].ToString();
-
txtImgUrl.Text = dr["ImageUrl"].ToString();
-
storedByte = (byte[])dr["ImageData"];
-
//long lRes = dr.GetBytes(5,0,storedByte,0,100);
-
}
-
MemoryStream ms = new MemoryStream(storedByte, 0,
-
storedByte.Length);
-
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
- <<--- Error Occurred Here
-
System.Drawing.Image otherImg = img.GetThumbnailImage(100, 100,
-
null, new IntPtr());
-
//otherImg.Save(ms, img.RawFormat);
-
otherImg.Save(filePath,
-
System.Drawing.Imaging.ImageFormat.Jpeg);
-
//byte[] byteImg = new byte[ms.Length];
-
//ms.Position = 0;
-
//ms.Read(byteImg, 0, byteImg.Length);
-
//System.Drawing.Image img =
-
System.Drawing.Image.FromStream(new
-
MemoryStream(storedByte, 0, storedByte.Length));
-
//img.Save(filePath);
-
//fs.Write(storedByte, 0, storedByte.Length);
-
//fs.Flush();
-
//fs.Close();
-
if (File.Exists(filePath))
-
PicImg2.ImageUrl = filePath;
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
}
-
}
-
private void InsertProcess()
-
{
-
if (CheckFields(1))
-
{
-
FileStream fs = new
-
FileStream(txtImgFile.Text.Trim(),FileMode.OpenOrCreate,FileAccess.Read);
-
byte[] imgByte = new byte[fs.Length];
-
fs.Read(imgByte,0,(int)fs.Length);
-
fs.Close();
-
//Testing storing image as binary in database
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText,conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
int iRes = cmd.ExecuteNonQuery();
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
private void InsertProcess2()
-
{
-
if (CheckFields(0))
-
{
-
HttpPostedFile imgFile = txtFile1.PostedFile;
-
int imgLen = imgFile.ContentLength;
-
string imgType = imgFile.ContentType;
-
byte[] imgByte = new byte[imgLen];
-
imgFile.InputStream.Read(imgByte, 0, imgLen);
-
//Testing storing image as binary in database
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
int iRes = cmd.ExecuteNonQuery();
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
Anyone?
Thanks in Advanced...
den2005
--
MCP Year 2005, Philippines
Augustin,
That's the requirement what I am doing right now.
Winista,
Thanks for the link, but I am seen this approach, I am looking for
approach that converts stored sql binary/image datatype data back to an image
(jpeg) file.
dennis
--
MCP Year 2005, Philippines
"Winista" wrote:
This article should be of help..
http://www.netomatix.com/development...splayBlob.aspx
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
Hi everyone,
Here is code working on..Trying to insert record with a column with Image
or VarBinary datatype in sql database from a existing jpeg image file,
then
retrieve this image from database and display it in a Image web control
dynamically(at runtime).
The process after being displayed in the web control, user click
insert/add
button, it converts the image(jpeg) file to bytes[] and store it the
database
with Image or VarBinary Datatype. While in retrieval, I get the specific
record, store the Image or VarBinary Data in local byte[] variable, and
then
convert this to a image (jpeg) file and used the filepath to display file.
The problem still unable to display image and create image file. -
//Get Image Record Stored and display them
-
private void GetImageRecord()
-
{
-
if (CheckFields(2))
-
{
-
string sqlText = "Select * From PictureImages Where ImageName =
-
@ImgName";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
SqlDataReader dr = cmd.ExecuteReader();
-
string filePath = Request.PhysicalApplicationPath +
-
txtImgName.Text + ".jpg";
-
FileStream fs = new FileStream(filePath, FileMode.Create,
-
FileAccess.Write);
-
-
byte[] storedByte = null;
-
//byte storedByte = null;
-
//MemoryStream ms = new MemoryStream(storedByte);
-
//StreamWriter sw = new StreamWriter(filePath);
-
-
while (dr.Read())
-
{
-
lblImgNo.Text = dr["ImageNo"].ToString();
-
txtImgDesc.Text = dr["Description"].ToString();
-
txtImgUrl.Text = dr["ImageUrl"].ToString();
-
storedByte = (byte[])dr["ImageData"];
-
//long lRes = dr.GetBytes(5,0,storedByte,0,100);
-
}
-
MemoryStream ms = new MemoryStream(storedByte, 0,
-
storedByte.Length);
-
System.Drawing.Image img = System.Drawing.Image.FromStream(ms);
-
<<--- Error Occurred Here
-
System.Drawing.Image otherImg = img.GetThumbnailImage(100, 100,
-
null, new IntPtr());
-
//otherImg.Save(ms, img.RawFormat);
-
otherImg.Save(filePath,
-
System.Drawing.Imaging.ImageFormat.Jpeg);
-
-
//byte[] byteImg = new byte[ms.Length];
-
//ms.Position = 0;
-
//ms.Read(byteImg, 0, byteImg.Length);
-
-
//System.Drawing.Image img =
-
System.Drawing.Image.FromStream(new
-
MemoryStream(storedByte, 0, storedByte.Length));
-
//img.Save(filePath);
-
-
//fs.Write(storedByte, 0, storedByte.Length);
-
//fs.Flush();
-
//fs.Close();
-
if (File.Exists(filePath))
-
PicImg2.ImageUrl = filePath;
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
}
-
}
-
-
private void InsertProcess()
-
{
-
if (CheckFields(1))
-
{
-
FileStream fs = new
-
FileStream(txtImgFile.Text.Trim(),FileMode.OpenOrCreate,FileAccess.Read);
-
-
byte[] imgByte = new byte[fs.Length];
-
fs.Read(imgByte,0,(int)fs.Length);
-
fs.Close();
-
//Testing storing image as binary in database
-
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText,conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
int iRes = cmd.ExecuteNonQuery();
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
-
private void InsertProcess2()
-
{
-
if (CheckFields(0))
-
{
-
HttpPostedFile imgFile = txtFile1.PostedFile;
-
int imgLen = imgFile.ContentLength;
-
string imgType = imgFile.ContentType;
-
byte[] imgByte = new byte[imgLen];
-
imgFile.InputStream.Read(imgByte, 0, imgLen);
-
-
//Testing storing image as binary in database
-
-
string sqlText = "Insert PictureImages
-
Values(@ImgName,@Desc,@Url,@Img)";
-
SqlCommand cmd = new SqlCommand(sqlText, conn);
-
cmd.Parameters.Add("@ImgName", SqlDbType.VarChar, 20,
-
"ImageName").Value = txtImgName.Text.Trim();
-
cmd.Parameters.Add("@Desc", SqlDbType.VarChar, 100,
-
"Description").Value = txtImgDesc.Text.Trim();
-
cmd.Parameters.Add("@Url", SqlDbType.VarChar, 50,
-
"ImageUrl").Value = txtImgUrl.Text.Trim();
-
cmd.Parameters.Add("@Img", SqlDbType.Image, 16,
-
"ImageData").Value = imgByte;
-
if (conn.State == ConnectionState.Closed)
-
conn.Open();
-
-
int iRes = cmd.ExecuteNonQuery();
-
-
if (conn.State == ConnectionState.Open)
-
conn.Close();
-
-
if (iRes 0)
-
lblMessage.Text = "Successfully Added New Record.";
-
else
-
lblMessage.Text = "Failed to add new record.";
-
}
-
}
-
Anyone?
Thanks in Advanced...
den2005
--
MCP Year 2005, Philippines
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Satish |
last post by:
Dear all,
Iam unable to laod images at runtime from the file folder / database
through C# code with asp. net and Crystal reports
All the solutions given are through RDC COM Component..
but no...
|
by: hussein |
last post by:
'm not bale to run my projec on the 2000 server, he error was:
error while trying to run project: unable to start debugging on the web server.erver side error occurred on sending debug HTTP request...
|
by: Eric Keung |
last post by:
Hi all,
my case is I want to get an image from access database and I just know it's "OLE object" field type at access
I also don't know how to insert it into access
here is my code and it just...
|
by: js |
last post by:
Does anybody knows how to solve the problem? I added
attribute to the following classes in
Microsoft.Practices.EnterpriseLibrary.Data namespace, but I still get
the error. Thanks.
...
|
by: Nachi |
last post by:
I have installed SQL Server 2000 with VS 2005 - did not install
SqlExpress\Sql 2005. I have a remote Sql Server Instance locally. The
normal application connectes to this Sql Server. When I run...
|
by: eholz1 |
last post by:
Hello Group,
Perhaps you can help me. I have a mysql db, that holds images.
Images are encoded using base64_decode/encode, etc. Image data seems
fine.
I have a view.php page that is supposed...
|
by: Erik Lautier |
last post by:
Hello, I'm using a multipart/form-data upload to put an image into SQL
Server, and it appears to be working, but I'm unable to display the
image. All I'm getting is the text of the URL we're on in...
|
by: kulkanuja |
last post by:
i am using image control in asp.net in c# now i want to display binary(format) image from database to image control.
how do i do iot pls help.
|
by: swethak |
last post by:
Hi,
I write the code to display images.But it will not display image.And also gives the error like that
error : Notice: Undefined index: gim in F:\Facebook\pic_up.php on line 59
plz tell...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |