vb vs vb .net

Joined
Dec 28, 2004
Messages
7
Programming Experience
5-10
I am having a few problems converting to dotnet

I used to be able to do this:
Public Sub DeleteImage(Image_ID As Long)
Dim Enumber As Long
Dim Query As String
On Error GoTo Err_DeleteImage
'Delete Single image from images table
Query = "Delete from Images where Image_ID = " & Image_ID
'conn is/was my adob connection (now:
' Public ADconn As SqlConnection = New SqlConnection )

conn.Execute Query ' <- This does not work in DotNet

Exit Sub
Err_DeleteImage:
Enumber = Err
Call DebugOut("DeleteImage", "On error " & Err & " " & Error)
Resume Next
End Sub


So what is the correct way to just execute a query dotnet/ADOR
is there anything that shows a translation from adob to ador?
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
VB.NET:
Dim Query As new sqlcommand ("Delete from Images where Image_ID = " & Image_ID, ADconn )

adconn.open 
query.executenonquery
adconn.close

TPM
 
Top Bottom