Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do we Read/Write Picture Images from/on SQL 2000

Status
Not open for further replies.

paulgenga

Programmer
Jan 8, 2004
61
KE
I need help in reading a image from the database where by I have tried the code as follows but failed with the error message. [r]*Type mismatch*[/r]
Code:
rsTemp.ActiveConnection = strConnection
rsTemp.Open "Select * FROM m_patient WHERE Dtd=0 And patient_id = " + Trim(str(FindID)), , adOpenForwardOnly, adLockReadOnly
Me.Picture1.Picture = IIf(IsNull(!general_case_study_photo), 0, !general_case_study_photo)

Please advice on how to save this picture as well
Code:
With cmdPatient
        .CommandType = adCmdStoredProc
        .ActiveConnection = strConnection
        .CommandText = "amd_m_patient"
        .Parameters("@general_case_study_photo") = Me.Picture1.Picture
        .CommandTimeout = 0
        Set rsPatient = cmdPatient.Execute

many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top