Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42329

Problems with Linq-to-SQL

$
0
0
I've created a sql server in the App_Data folder of my solution. I then created a linq to sql dml in a class library and copied the folders across.

From a Web Form on load method in the root folder I have:
Code:

        Dim dc As New MilkywayDataContext()
        Dim q = From m In dc.Users _
                Select m
        UsersGridView.DataSource = q
        ' UsersGridView.DataBind()

The problem happens when I bind q to the datagrid. Visual basics stops responding and shuts down. This has been a constant occurence all evening anything I try. I'm using
VS 2012 express.

Anyone know how I can fix this?

Cheers

Viewing all articles
Browse latest Browse all 42329

Trending Articles