Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Urgent Urgent : create triggers from code

Author  Topic 

PrisonBreak
Starting Member

2 Posts

Posted - 2007-11-21 : 10:08:02
hello guys
i just wanted to ask how can i create triggers from code using VB6 or anyother version of VB
i made a command and assinged the trigger script to the command but i didnt work out ! it sounds the commands connot exexute T-SQL scripts
ok .
what i'm doing exactly is trying to make triggers to some tables from code and then droping these triggers
if i exxcute the script from the query analyzer it works fine, but not from the code
can anybody help please please its urgent
thank you

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-21 : 10:54:22
on the face of it, this sounds like a bad idea. client apps should not be creating triggers and whatnot, unless your app is used to manage databases, like EM or SSMS.

in any case, it's unlikely anyone can tell you what's wrong unless you say what the error msg was.


elsasoft.org
Go to Top of Page

PrisonBreak
Starting Member

2 Posts

Posted - 2007-11-24 : 00:16:11
In visual basic i use the command object to perform the sql statment , but it doesn't work out for the T-SQL scripts . they connot be executed from the command itself. thats my problem . YES my application is made to manage Databases.
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-24 : 19:41:15
what's the error?

perhaps you have embedded "GO" statements in your script?


elsasoft.org
Go to Top of Page
   

- Advertisement -