> > Dim nDatabase As New SQLDMO.Database() > > Dim strProc As New SQLDMO.StoredProcedure() > strProc.Name = "Sp_CreateTableCompany" > strProc.Text = "CREATE procedure InsEmployees(" & _ > "@v_EmpNo int,@v_Name varchar(50),@v_Surname varchar(50)," & _ > "@v_isPermanent char(10))" & _ > "as " & _ > "Begin Insert Into PersonalInfo(EmpNo,Name,Surname,isPermanent)" & _ > "values (@v_EmpNo,@v_Name,@v_Surname ,@v_isPermanent) end" > > nDatabase.StoredProcedures.Add(strProc) >First problem I see right away is that the name of your SP does not match the name in code. It should be InsEmployees. BTW, never start naming procedures with sp_ unless you want to create a system stored procedure.