Professional Documents
Culture Documents
Connection
Dim r As New ADODB.Recordset
Dim img1 As String
c.Execute sql
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
Combo1 = ""
ComboBox1 = ""
ComboBox2 = ""
Image1 = Nothing
MsgBox "Record saved"
End If
End Sub
End Sub
Private Sub Form_Load()
c.Open _
"Provider=sqloledb;" & _
"Data Source=DESKTOP-2TQIM0J\SQLEXPRESS;" & _
"Initial Catalog=Arts;" & _
"Trusted_Connection=yes;"
'======================================================
r.Open "Select Name from tbl_countries", c, adOpenKeyset, adLockPessimistic
While Not r.EOF
Combo1.AddItem r.Fields(0)
r.MoveNext
Wend
r.Close
'======================================================
End Sub