visual basic challenge
hi, i am developing a application in which i want to give a area in which user can draw a image and sava it to database with its id.
please solve my prblem as soon as possilble.
Web Development
hi, i am developing a application in which i want to give a area in which user can draw a image and sava it to database with its id.
please solve my prblem as soon as possilble.
by dryflies
use the doodle example that comes with VB and study up on ADODB. here is a hint:
Public Function getDoctorPhone(Doctor As String) As String
Dim dbll As ADODB.Connection
Dim docs As ADODB.Recordset
Dim Phone As String
Dim cnn1 As String
Dim grystr As String
Dim dbsource As String
If Doctor = "" Then
getDoctorPhone = ""
Exit Function
End If
dbsource = CurrentDb.Name
cnn1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dbsource + ";"
Set dbll = New ADODB.Connection
dbll.Open cnn1
qrystr = "SELECT [Doctor List].DoctorPhone FROM [Doctor List]WHERE ((([Doctor List].DoctorName)=""" + Doctor + """));"
Set docs = New ADODB.Recordset
docs.Open qrystr, dbll
docs.MoveFirst
If docs.EOF = False Then
getDoctorPhone = docs.Fields("DoctorPhone")
Else
getDoctorPhone = "(555)555-1212"
End If
docs.Close
dbll.Close
End Function
by rrv
My friend. This concept is called BLOB. - Binary Large Object. You can find sample VB6/NET code to write a image file to database and retrieve it. It uses GetChunk and AppendChunk. The URL is http://support.microsoft.com/default.aspx?scid=kb;en-us;Q258038
Good luck
by rrv
This discussion is closed to new replies.
Sort by Trending