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 4948
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 discussion thread is closed Replies have been disabled for this discussion. Similar topics
reply
views
Thread by Satish |
last post: by
|
3 posts
views
Thread by hussein |
last post: by
|
1 post
views
Thread by Eric Keung |
last post: by
|
1 post
views
Thread by js |
last post: by
|
reply
views
Thread by Nachi |
last post: by
|
7 posts
views
Thread by eholz1 |
last post: by
|
1 post
views
Thread by Erik Lautier |
last post: by
| | | | | | | | | | | | |