Hai,
I have no problem of inserting images to sql server 2000 from ASP.NET , but while retreiving it retrieves one image only, but i have 3 images in the table , i have the used the following code , if any mistake pl reply me
i have table image1 with field imgid,img
Code:-
Dim cn As New SqlClient.SqlCo nnection
cn.ConnectionSt ring = "Persist Security Info=False;User ID=sa;Initial Catalog=master; password=david; "
cn.Open()
Dim myCommand As New SqlCommand("Sel ect * from image1", cn)
Try
Dim myDataReader As SqlDataReader
myDataReader = myCommand.Execu teReader(Comman dBehavior.Close Connection)
While (myDataReader.R ead())
Response.Binary Write(myDataRea der.Item("img") )
End While
cn.Close()
Response.Write( "Person info successfully retrieved!")
Catch SQLexc As SqlException
Response.Write( "Read Failed : " & SQLexc.ToString ())
End Try
Next
pl reply me i need for my project........ ............... .........
Posted Date:- 11 Feb 2008
Davidson
I have no problem of inserting images to sql server 2000 from ASP.NET , but while retreiving it retrieves one image only, but i have 3 images in the table , i have the used the following code , if any mistake pl reply me
i have table image1 with field imgid,img
Code:-
Dim cn As New SqlClient.SqlCo nnection
cn.ConnectionSt ring = "Persist Security Info=False;User ID=sa;Initial Catalog=master; password=david; "
cn.Open()
Dim myCommand As New SqlCommand("Sel ect * from image1", cn)
Try
Dim myDataReader As SqlDataReader
myDataReader = myCommand.Execu teReader(Comman dBehavior.Close Connection)
While (myDataReader.R ead())
Response.Binary Write(myDataRea der.Item("img") )
End While
cn.Close()
Response.Write( "Person info successfully retrieved!")
Catch SQLexc As SqlException
Response.Write( "Read Failed : " & SQLexc.ToString ())
End Try
Next
pl reply me i need for my project........ ............... .........
Posted Date:- 11 Feb 2008
Davidson
Comment