LINQ to SQL
-
I have a Windows application in Visual Studio 2008. This application has data which I want to store in a database. I went into SQL Server Management Studio 2008 and created data tables which I want to access from Visual Studio. I have clicked on Project, Add new item, Linq to SQL. I have a window open that's labelled DataClasses1.dbml. I clicked on Data and add new data source. In that tab I clicked on Add New Data Source. I clicked on Database and next. I clicked on New Connection and have a window open "Add Connection". I don't know what to do here. Can anybody help me? Thanks. Darrall
-
I have a Windows application in Visual Studio 2008. This application has data which I want to store in a database. I went into SQL Server Management Studio 2008 and created data tables which I want to access from Visual Studio. I have clicked on Project, Add new item, Linq to SQL. I have a window open that's labelled DataClasses1.dbml. I clicked on Data and add new data source. In that tab I clicked on Add New Data Source. I clicked on Database and next. I clicked on New Connection and have a window open "Add Connection". I don't know what to do here. Can anybody help me? Thanks. Darrall
Choose the ConnectionType (OleDb, SQL, SQLCompact....) Then choose the server or type it (if express edition then defult it is something like .\SQLEXPRESS), then choose the DB, Test the Connection clikc OK or Add foollowed by some Next(s). Then in order to use LINQ to SQL you need to "add new file" to your project, choose LINQ to SQL DBML follow and follow the setps. NOTE: IN Visual Studio Express(C# lets say) you can't do it. At least not in the 2008 version. You add the DBML. You need to manually create the DataContext/Mapping. But a much better source will be Gingle. Search for videos of LINQ to SQL.
-
Choose the ConnectionType (OleDb, SQL, SQLCompact....) Then choose the server or type it (if express edition then defult it is something like .\SQLEXPRESS), then choose the DB, Test the Connection clikc OK or Add foollowed by some Next(s). Then in order to use LINQ to SQL you need to "add new file" to your project, choose LINQ to SQL DBML follow and follow the setps. NOTE: IN Visual Studio Express(C# lets say) you can't do it. At least not in the 2008 version. You add the DBML. You need to manually create the DataContext/Mapping. But a much better source will be Gingle. Search for videos of LINQ to SQL.
-
Thanks for your answer. What I still need to know is what to put under Database: I created a database called ConstructionSurveyLayout in Management Studio but when I Browse my computer I can't find it. What am I supposed to put in that textbox?
-
normally the DBs on a local/personal computer not Server/Network should be in a folder like: C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA