Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by dinivan

  1. dinivan

    syntax error in stored procedure

    I did as advised but now because i have defined policyRef as an int, i am now getting the error message: Cannot specify a column width on data type int. Parameter '@policyRef' has an invalid datatype. Is there anyway around this ?? create procedure add_policy @policyRef int (4), @fileRef...
  2. dinivan

    syntax error in stored procedure

    I'm new to sql and have the following stored procedure but when i check the syntax i keep getting the following error Incorrect syntax near the keyword "begin". Its probably something simple but i just can't see it. create procedure add_policy @policyRef int (4), @fileRef nvarchar (50)...
  3. dinivan

    inserting problem with trigger

    Hi maswien, i was wondering if you would be able to explain to me how to execute the procedure using asp. I have done a search on the web but am still not sure, any help would be gratefully appreciated. cheers dinivan
  4. dinivan

    inserting problem with trigger

    Thanks for the advice Maswien, i'll give it a go at work tomorrow. Cheers dinivan.
  5. dinivan

    inserting problem with trigger

    Hi Chris, I suppose I should explain from the start what i'm trying to do. I need to take the policyID from the main table and insert it into the policyID field in the sub table. I have achieved this by creating a trigger which is executed once info has been inserted into the main...
  6. dinivan

    inserting problem with trigger

    I hope someone will be able to help me with the problem I am having. When the trigger i have attached to my main table is fired it is entering the policyID from the main table into the sub table but it is entering the information entered through the form into a separate row in the sub table...
  7. dinivan

    sql database - triggers

    I don't really understand what you mean, could you please give me an example. cheers dinivan
  8. dinivan

    sql database - triggers

    Thanks SQLSister for all you help. But I have one more problem I was hoping you would be able to help me with. When the trigger is fired it is entering the policyID from the main table into the sub table but it is entering the information entered through the form into a separate row in the sub...
  9. dinivan

    sql database - triggers

    I have ammended the trigger below as suggested but I am now gettign the following error Error 207:Invalid column name 'Field1') what does field on refer to. CREATE TRIGGER PolicyID ON [dbo].[tbl_policy_main_donna] FOR INSERT, UPDATE, DELETE AS if @@rowcount = 0 return Insert into...
  10. dinivan

    sql database - triggers

    Hi i have created this trigger but when i try to close it i get the following error Error 213: Insert Error Column name or number of supplied values does not match table definition. Invalid column name 'Policy_ID'. CREATE TRIGGER PolicyID ON [dbo].[tbl_policy_main_donna] FOR INSERT, UPDATE...
  11. dinivan

    sql database - triggers

    Hi, I am new to sql databases and was wondering would anybody be able to help me with triggers. I need to write a trigger which is fired when something is entered into the main table, it will then populate the sub table with the primary key from the main table. Any help would greatly be...

Part and Inventory Search

Back
Top