|
-
Oct 3rd, 2003, 03:10 AM
#1
Thread Starter
Member
Images in SQL Table to Imagelist
Hi All,
I try to put images from a table in SQL in an Imagelist.
Please can anybody help me with some code to fix this problem, I stepped over from Delphi to VB.NET and in delphi it was quit simple to do this.
CODE:
strSQL = "SELECT image FROM icons"
cnSQL = New SqlConnection(AssignConnectionString("DB"))
cnSQL.Open()
cmSQL = New SqlCommand(strSQL, cnSQL)
drSQL = cmSQL.ExecuteReader()
Dim OwnList As New ImageList
Do While drSQL.Read
OwnList.Images.Add(drSQL.Item("image").SqlDbType.image)
....
....
Loop
drSQL.Close()
cnSQL.Close()
cmSQL.Dispose()
cnSQL.Dispose()
Thanks,
AXH:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|