Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users
Sub A() Call oAppend(Now, "tester", 2) End Sub Public Sub oAppend(ByVal oDate As Date, ByVal oText As String, ByVal oNumber As Single) Dim oSQL As String On Error GoTo EH Set con = New ADODB.Connection con.Open "Provider=SQLOLEDB;Data Source=196.2550.423.227,1444;Network Library=DBMSSOCN;Initial Catalog=test;User ID=murbroscave;Password=yabbadabbaidiot;" Set cmd = New ADODB.Command oSQL = "Insert Into Table1 ([oDate],[oText], [oNumber]) Select '" & oDate & "' as Expr1, '" & oText & "' as Expr2, " & oNumber & " as Expr3" With cmd .CommandText = oSQL .CommandType = adCmdText .ActiveConnection = con .Execute End With '+++++ CHECK WHETHER ENTRY SUCCESSFUL ++++++++++++++++++++++++++++++++++++++ '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Set cmd = Nothing Set con = Nothing Exit Sub EH: MsgBox Err.Description End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.