You can providing you have the correct database admin permissions.
An example of the code would be
VB:Sub InsertARecord() Dim cnt As ADODB.Connection Dim rst As ADODB.Recordset Dim stCon As String, stSQL As String Set cnt = New ADODB.Connection Set rst = New ADODB.Recordset stCon = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=JOEY" cnt.ConnectionString = stCon stSQL = "INSERT INTO MyTable (Price)" stSQL = stSQL & "VALUES (500)" cnt.Open rst.Open stSQL, cnt, adOpenStatic, adLockReadOnly, adCmdText If CBool(rst.State And adStateOpen) = True Then rst.Close Set rst = Nothing If CBool(cnt.State And adStateOpen) = True Then cnt.Close Set cnt = Nothing End Sub


Reply With Quote
Bookmarks