General discussion

Locked

visual basic challenge

By sudeep_395 ·
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.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by dryflies In reply to visual basic challenge

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

Collapse -

by RRV In reply to visual basic challenge

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

Collapse -

by RRV In reply to

Please rate this answer.

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums