On Error resume nextdim mu_connstring, mu_insertsqlmu_connstring = "driver = {SQL Server}; server = 192. XX. XX. XX; database = testfax; uid = sa; Pwd = xxx; "'connect SQL server2005 'Mu _ connstring =" provider = msdaora.1; Data Source = gsxx; user id = gsxxx; password = gsxxx "'connect to the Oracle database mu_insertsql =" insert into t_userinfo (uname, uage, umoney) values ('day', 20,300 0) "dim objconnection, objcommandset objconnection = Createobject ("ADODB. connection ") set objcommand = Createobject (" ADODB. command ") objcommand. commandtype = 1objcommand. commandtext = mu_insertsqlobjconnection.open mu_connstring 'Open the database if (objconnection. state = 0) Then msgbox "failed to connect to Database" else objcommand. activeconnection = objconnection 'must be placed after the database is opened. execute if err. number = 0 then msgbox "execution insertion successful" else msgbox "execution insertion failed" end if objconnection. close set objcommand = nothing set objconnection = nothingend ifmsgbox "operation ended"