Connect Visual Basic form to SQL Server database - sql-server

I am using Visual Studio 2008. I have created a visual basic form that allows user to enter his details. Now I need to store the data entered by the user in the SQL database.
Can anyone tell me how to connect my form to the database. I am new to Visual Basic, so can please anyone provide me with some links regarding the same.

There is a very nice set of tutorials here that show how to do data access with ASP.NET that you should be able to translate to Windows forms (In both VB & C#)

Related

Moving my access application with SQL server back end to sharepoint

I'm currently thinking of migrating my MS Access (connected to a SQL Server 2008 database) applications to SharePoint 2010 in order to have the freedom to access/edit the data anywhere.
My question is.. How big a task is it to move the data from my SQL Server database to the SharePoint server?
Has anyone done this before? I'm still researching SharePoint therefore any advice would be greatly appreciated.
It depends how complex are your forms in Access and the complexity of the manipulation you want to do with your data. If it is a simple data model then you can go easily with the BCS in SharePoint. Further to customize the forms you can use Infopath designer if you are not much familiar with ASP.Net.

Architecture of team foundation server (tfs) excel add-in

We can use Excel to connect to a TFS server and then select a work item query. Based on the query a list of work Items shows up in excel. The data can be edited and published (saved) back to server.
I would like to know the architecture / technology that TFS excel add-in uses to save the data back to TFS.
Main question is does excel access data using which one of the following:
a web service that TFS exposes
the code in add-in using some TFS client side object model or
is it using some SQL server or SharePoint out of the box functionality to do it.
I’m pretty sure Excel is using TFS SDK libraries that are using TFS Web service in the background to achieve this.
I can tell you for sure that it’s not directly connecting to TFS database – that simply wouldn’t work every time remote connections on TFS database server are disabled. It would also require you to enter user/password for SQL Server instance it needs to connect to.
Here are couple links to get you started in the right direction.
Extending Team Foundation
Connect to Team Foundation Server from a Console Application – I’m not 100% sure but I guess excel is using something similar to this…
Hope these links helps you to understand more.
http://msdn.microsoft.com/en-us/library/vstudio/bb649552.aspx#self_service_excel
Olap data cube http://msdn.microsoft.com/en-us/library/bb649557.aspx

How do I add a database diagram in visual studio 2010?

I created a database in App_Data, but when I try to generate a diagram for it by right clicking on "Database Diagrams" and then adding a new diagram I get the error: "Could not obtain information about Windows NT group/user"
with the error code 0x534
Does anyone know how I can create database diagrams?
I tried googling but no obvious answers came up.
To create a DB diagram in VS 2010, open Server Explorer, click on the connection to your DB, right-click on Database Diagrams and select New Diagram.
You can create and view the same diagrams from within SQL Server Management Studio.
Another option is to use Visio; it has some great DB diagramming support.
Otherwise, the DB diagrams that I'm aware of that are coupled with your VS project tend to be associated with specific "subsystems," such as Entity Framework.
I had the same issue and I resolved it by running my Visual Studio project. Then I stopped and tried again. This was enough to solve the issue.

visual studio 2010 database project, is there a visual way?

started a visual studio 2010 database project. however i am only able to write sql in a text mode, there is no functionality in making the table for example in a visual view as exists when you add a new database to app_data folder and the work on it there.
is this the only way and there is no visual way of doing this in the visual studio 2010 database project? or am i missing some obvious way of getting to it?
http://img693.imageshack.us/img693/9311/42342496.png
thank you
also if there is a tutorial anywhere (video maybe!?) please link it. i only found importing a database from an existing script video using a wizard. would like new database from scratch without wizard.
There is a simple workaround you can use to have visual design capabilities. You need a dev database set up anywhere. Now create a schema synchronization with Visual Studios built-in Schema Comparison. This will allow you to pull changes between your dev database and your database project back and forth.
Since you can sync in both directions, you can make changes to your database via database diagrams from inside VS (via the Server Explorer) or you can use SQL Server Management Studio (or whatever else you like). When you're done, simply sync your changes using the schema comparison. It works in the opposite direction too, simply change one of your scripts and then sync with your dev database.

How do I connect to an Access 2007 (accdb) file in Visual Studio 2008

I'm in a college class using the Microsoft visual studio 2008 for visual basic and i have a project where i'm supposed to connect a database but it can't recognize the database file as a database. I followed the book exactly so i don't know what the problem is.
You may need to install the Office 2007 Data Connectivity Components.
(See also: this MSDN forum post)
Check out http://connectionstrings.com/access-2007
this site will tell you what connection string you need to connect to Access 2007. Make sure your connection string is OK. Also try using the server explorer in Visual Studio to connect to the file; just add a new connection pointing to the Access file and click the "Test Connection" button and you should be good to go. Hope that helps.
Maybe you are a visual person: MSDN How Do I Video Series This helped me out when building in an Access database to a project. TableAdapters is what I did not know how to implement and after this tutorial, I was doing great.
It will not connect until you change the format to mdb . go to acces project
and go in save as option and save as access 2000 compatible format . now connect it to vb it will be connected . accdb file formats are supported by vb 2010 or 2010 too i think .
Regards

Resources