Need starting place for VB linq to sql+datasets

Posted on 2012-08-16
Last Modified: 2012-08-21
I'm looking for is a good VB tutorial how to do these things or an example that can explain each part of why it was done the way it was done.

I'm new to programming and all the sites I find show me how to do select, insert, update, delete using LINQ. My problem isn't so much doing these task as it is how to get these individual row/columns to use controls like text boxes. I know hot to pull from text boxes and into the SQL database, but I don't know how to pull from SQL databse to put info into text boxes I can only do datagridview.
I know the very basic of using datasets, but I don't want to have to type a long SQL select statement then trying to figure out whats wrong with it (The purpose of LINQ I believe) to fill these datasets.

Sorta side question I know its kinda vague but Overall is it easier to write a  complete interface to a databases UI going to use just LINQ to SQL, Datasets, or a combination of LINQ + Datasets?
Question by:easyworks
    LVL 83

    Accepted Solution

    Not sure I fully understand you questions. In a production project that I did sometime ago, I used a combination of LINQ and Datasets. I used LINQ2SQL for creating, retrieving, updating, and deleting objects. I used datasets with stored procedures for listing objects for performance reasons. I said objects because in LINQ its objects not rows.
    LVL 1

    Author Comment

    I do not know how to really word my question, because I don't know enough to really ask. I'm trying to find a starting point that explains to me how I can pull from a database using LINQ with controls like text boxes.

    For example I have just a dataset not using LINQ, but I would like to figure out how to use LINQ in this code, because I can take things from a dataset and put it into a text box.
    'ds is the dataset, firstdb is my database, inc changes which row you have selected.
    txtInvoiceNumber.Text = ds.Tables("Firstdb").Rows(inc).Item("InvoiceNumber")

    Open in new window

    LVL 1

    Assisted Solution

    Dim query = (From invo In database.Invoices
                        Select invo).ToString

    just looking over the datasets examples and figuring out how to change the LINQ code to work with it...
    LVL 1

    Author Closing Comment

    Guess I just need to do some reading to become more versed on the subject before asking questions.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now