Home > Software engineering >  Vb code to create a temporary table urgent!
Vb code to create a temporary table urgent!

Time:10-07

Dim cn As ADODB. Connection
Set the cn=CreateObject (" ADODB. Connection ")
Cn. Open "the Provider=SQLOLEDB; Data Source=192.168.1.10; Initial Catalog=AIS20110520152804; User ID=sa; Password=kingpro - 87661168;"
SQL="create table # a" & amp; _
"(" & amp; _
"Formula one decimal (18, 2)," & amp; _
"F2 nvarchar (50)," & amp; _
"The f3 nvarchar (50)," & amp; _
"The f4 nvarchar (50)," & amp; _
"F5 nvarchar (50)," & amp; _
"F6 nvarchar (50)," & amp; _
"F7 nvarchar (50)," & amp; _
"F8 nvarchar (50)," & amp; _
"F9 nvarchar (50)" & amp; _

")"Cn. The Execute SQL
Cn. Close

After execution, to test database, tip # A invalid object name?
  •  Tags:  
  • VBA
  • Related