how do i want to save a picture in accsess database?
'You can create Varbinary(Max) datatype for image column 'Below is code to store Image Imports System.Data.SqlClient Dim myfilelocation As String = "C:\myPictures\myimage.jpg" Dim conn As New SqlConnection("Data Source= .\sqlexpress; Initial Catalog=Temp;Integrated Security =True") Dim cmd As New SqlCommand("Insert Into ImageTable(ImageFile,CustomerID) Values (@ImageData,@CustomerID)", conn) Dim param As New SqlParameter("@ImageData", SqlDbType.VarBinary) Dim ImageData As Byte() = IO.File.ReadAllBytes(myfilelocation) param.Value = ImageData cmd.Parameters.Add(param) cmd.Parameters.AddWithValue("@CustomerID", 3) Try conn.Open() cmd.ExecuteNonQuery() Catch ex As Exception MessageBox.Show(ex.Message) Finally conn.Close() End Try 'And Below is the code to retrieve Dim conn As New SqlConnection("Data Source= .\sqlexpress; Initial Catalog=Temp;Integrated Security =True") Dim cmd As New SqlCommand("select ImageFile from ImageTable where CustomerID=@CustomerID ", conn) cmd.Parameters.AddWithValue("@CustomerID", 3) Try conn.Open() PictureBox1.Image = Image.FromStream(New IO.MemoryStream(CType(cmd.ExecuteScalar, Byte()))) ' or you can save in a file 'IO.File.WriteAllBytes("c:\backup\image3.jpg", CType(cmd.ExecuteScalar, Byte())) Catch ex As Exception MessageBox.Show(ex.Message) Finally conn.Close() End Try
hello firend,my mean is save picture in access database and i want to put the image in picture box in my form.
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...
there are five tables (personTb, addressTb,churchTb) each holds data pertinent to an individual; (personAddress,personChurch) each hold the primary key for the person table and corresponding table IE personAddress holds primary key for addressTb.
both snippets work, my question is; Is my join correctly formatted?
select concat(personTb.p_fName,' ',personTb.p_mName,'. ',personTb.p_lName) ...