Added: 1 year ago
From: mkaatr
Views: 4,808
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (21)

Sign In or Sign Up now to post a comment!
  • How can i select list of people and seperate them ?

  • @Dartheppa

    If you want to get a number of values you should use a table adapter and use a select query to fill that.

    the "Where" part allows you to separate the list based on any criteria you see fit. For example - and assuming there is a table called table having column called age:

    Select * from people where age>30

    will get you all people those age greater than 30.

  • @mkaatr (bow) thank you :)

    if its not too much could u help me out again.

    im making a Db application for kicks and im stuck .

    i want to make my next action to be the previous action when i update my next action automaticaly

  • @Dartheppa

    Hi there...

    what do you mean by action here...? I assume in this case that you want to store the "Action" value in the database. So the value of the column "Next action" get transferred to "previous action" for the same given row, You could use a simple query, its sql should be:

    update yourtablename set PreviousAction=NextAction, NextAction=@YourNewNextAction where YourRowID=@rowid

    hope this helps :)

  • @mkaatr u are god and i am ur humble follower (bow) , cant believe i forgot about UPDATE :(

    thankyou :)

  • @Dartheppa

    Dude you are giving me too much credit. I am not that good, and at some point my skills were similar to yours. With practice you could get better and better.

    cheers :)

  • @mkaatr have to give credit where credit is due. :)

    i appreciate the help

    thank you

  • i get these error can someone help Index was out of range. Must be non-negative and less than the size of the collection.

    Parameter name: index

  • @MrAshiid Which statement is giving you the error? The error states that you are accessing an array, or collection , or list - of rows for example - and supplying the wrong index. For example you could get this error from this code:

    Dim A As New Collection

    A.Add("hi")

    MsgBox A(0)

    the reason for the error here is that a Collection index starts from 1 not zero, but:

    Dim A As New List(Of String)

    A.Add("hi")

    MsgBox A(0) ' works

    MsgBox A(1) ' gives error because lists start from 0

  • @mkaatr it's the delete statement

  • @MrAshiid

    A delete statement shouldn't trigger such error. Could you paste the whole block of code so that I get an idea where the error is?

    Also did you try to trace the code and see exactly where the error is happening?

  • Great Job on the videos, you go into more depth then most!! I have one issue how do i make the program so that i can switch database and SQL servers? I know how to build the connection string and i have a preferences form to switch the connections but then i cant use the "wizards" to build the datasets. I would be happy to give you what i have for code so far.

  • @redsoxyeargmail

    Hi there...

    if your databases are exactly the same structure, then you create a dataset for your db, and then at runtime, you just change the connection string. You could change application's settings at runtime to address this issue.

    yours

  • can you show me how to make update in addition with that project. thanks in advance.

  • @royalopez06

    hi there...

    use the sql update statement: update people set pname=@0,name=@1,address=@2 where pname=@3

    the rest of the steps is the same.

    by the way, you could use the table adapter to do the same. It might be easier, and you don't have to create a query.

    yours

  • I followed your video, and it works fine, but if I close it and actually open the access database it isn't updated. Whats the problem?

  • @Greenmet29

    Hi there...

    if you include the database in your project make sure that you are opening the database that is in the debug / bin folder not the other one. The original db is not affected.

    yours

  • hi how did you add that addperson. i got error in QA.addperson

  • @uboomn

    Hi there...

    Check the link provided in the description. You can see step by step what I did. If you still having problems let me know.

    yours.

  • I didn't know about the query adapter - good video, thanks!

Loading...
Alert icon
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