Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • It works great. But I have a question. On my web form I also have a DropDownList. It uses values from the database (table: id, name). I used SqlDataSource to show "name" in the Dropdownlist instead of "id".

    How should I convert this "name" from the dropdownlist into "id" and use it in that Click event Button code? Sorry for my language. I'm horrible at this...

    What I did before wasn't working:

    ..

    int numRows = qta.AddStuff(TextBox1.Text,Dro­pDownList1.SelectedItem.Value)­;

    ..

    Thanks for any help:)

  • To make this procedure use management studio and type this into the query window: USE YourDataBaseName GO CREATE PROCEDURE MyProcedureName ( @Parameter1 Parameter1Type, @Parameter2 Parameter2Type ) AS INSERT INTO tableName (Column1Name, Column2Name) VALUES (@Parameter1, @Parameter2) GO
  • If ONLY I had time! :)

  • The stored procedure is confusing. I'm not sure when the table name is used and the column name is used, as they're both labeled "stuff". Could someone please clarify? Also, (as I'm trying to make a stored procedure in VWD) an error message comes up saying "AddStuff" is an invalid object name. Any ideas?

  • @bkuethen

    Using 'stuff' was probably a bad idea. The general SQL statement to put data into a table is this:

    INSERT INTO tableName (Column1, Column2)

    VALUES (@Parameter1, @Parameter2)

    The order obviously matters as the first parameter is going to try and get inserted into column1 and the second into column2. The error your getting is from copying his code above. Its trying to ALTER a proc that probably doesn't yet exist (i.e. AddStuff). search online for TSQL stored procedure.

  • can anyone help me with the 2 lines in vb instead of C#?

  • Thanks for sharing this informative Video. For Expert Level .NET Video's visit "TheSYNERGETICS" channel on youtube . Synergetics is Awarded as the Best. NET Training Service Provider by Microsoft

  • This is fantastic!!! I LOVE your style.

    1000000 likes!

    And, of course, it helped me a lot!

  • Hello all.

    Found The code for the Click event Button. Its below: PubsDataTableAdapters.QueriesT­ableAdapter qta = new PubsDataTableAdapters.QueriesT­ableAdapter(); int numRows = qta.AddStuff(TextBox1.Text);

    There are only 2 lines of code... So remember that. Also i seen the code by Maximising the screen to Full Screen. its works great.

    Also well done to Bidwx for doing this under 2 mins. its brillant.

  • Comment removed

  • This video does help when dealing with SQL server databases but I'm working with Access 07 at the moment, I may have to consider switching up after seeing all the videos using SQL 2008.

  • i am having trouble creating the procedure in Access 2003... any suggestions?

  • LOL

    i feel to cry ....

  • Great job. Can you post the code you inserted into the button for the click event.

  • Gr8 vedio

    and Background music is good

    can anyone tell me which album is this

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more