[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need starting place for VB linq to sql+datasets

Posted on 2012-08-16
4
Medium Priority
?
609 Views
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?
0
Comment
Question by:easyworks
  • 3
4 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 750 total points
ID: 38301272
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.
0
 
LVL 1

Author Comment

by:easyworks
ID: 38301345
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

0
 
LVL 1

Assisted Solution

by:easyworks
easyworks earned 0 total points
ID: 38301476
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...
0
 
LVL 1

Author Closing Comment

by:easyworks
ID: 38315475
Guess I just need to do some reading to become more versed on the subject before asking questions.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
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.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

829 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