Thanks!!!
I am coding in Extra (mainframe) application. I am doing a screen scrape and then appending the data into an Access table. Some of the
VB commands work and some aren't. Below is the code where I am screen scraping and then trying to append this into Access:
mem_first_name = Sess0.Screen.GetString(15, 09, 12)
Const DBNAME = "C:\Work.mdb"
Dim connection_string As String, cn As Object, cmd As Object connection_string = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBNAME & ";Persist Security Info=False"
Set cn = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.Command")
cn.ConnectionString = connection_string
cn.Open
cmd.ActiveConnection = cn
name = "'" & mem_first_name & "'"
strSQL = "insert into Test ( FirstName ) Values (" & name & ")"
cmd.CommandText = strSQL
cmd.Execute
Set cmd = Nothing
Set cn = Nothing
End Sub
*------------------------------------*
It gives me a syntax error at the name statement.