There are references in the project SQLDMO added sqldmo SQLDMO.SQLServer2 sqlserver = new SQLDMO.SQLServer2Class (); sqlserver.Connect ( "localhost", "sa", ""); SQLDMO.Databases mydbs = sqlserver.Databases; SQLDMO.Database mydb = New SqldMo.databaseClass ();
Mydb = (SqldMo.database) MyDBS.Item ("Test", "SA"); System.io.StreamReader S = New System.io.StreamReader ("E: /XP/testsqldmo/a.sql"); String SQL = S.ReadToEnd ();
Mydb.executeimmediate (sql, sqldmo.sqldmo_exec_type.sqldmoexec_default, sql.length);