G
Guest
Have the following macro that inserts records from SQL table -
Selection.Range.InsertDatabase Format:=0, Style:=0, LinkToSource:=False, _
Connection:= _
"Provider=MSDASQL.1;Persist Security Info=True;Extended
Properties=""DSN=Spirit Group;UID=sa;APP=Microsoft Office
2003;WSID=YOUR-HKI1ASH75M;DATABASE=Spirit Group"";Initial Catalog=Spirit
Group" _
, SQLStatement:="SELECT * FROM ""HEATDb""" & "",
PasswordDocument:="", _
PasswordTemplate:="", WritePasswordDocument:="",
WritePasswordTemplate:= _
"", DataSource:= _
"C:\Documents and Settings\ian_clark.SOLUTEC\My Documents\My Data
Sources\Spirit Group HEATDb.odc" _
, From:=-1, To:=-1, IncludeFields:=True
How can I insert into this table i.e. need to do the following the SQL
syntax is – insert into
heatdb (dbname,tablename) values (‘abcd’,’abcd’)
Is it possible via a word macro?
Selection.Range.InsertDatabase Format:=0, Style:=0, LinkToSource:=False, _
Connection:= _
"Provider=MSDASQL.1;Persist Security Info=True;Extended
Properties=""DSN=Spirit Group;UID=sa;APP=Microsoft Office
2003;WSID=YOUR-HKI1ASH75M;DATABASE=Spirit Group"";Initial Catalog=Spirit
Group" _
, SQLStatement:="SELECT * FROM ""HEATDb""" & "",
PasswordDocument:="", _
PasswordTemplate:="", WritePasswordDocument:="",
WritePasswordTemplate:= _
"", DataSource:= _
"C:\Documents and Settings\ian_clark.SOLUTEC\My Documents\My Data
Sources\Spirit Group HEATDb.odc" _
, From:=-1, To:=-1, IncludeFields:=True
How can I insert into this table i.e. need to do the following the SQL
syntax is – insert into
heatdb (dbname,tablename) values (‘abcd’,’abcd’)
Is it possible via a word macro?