Monday, August 6, 2012

19. Conection VB to sql server

To build the database project in Visual C + + 6.0 which will then be connected to your SQL Server Please follow the steps - the steps below

  • In the work area Visual C + + click New or press Ctrl + N and then select Database Project and specify the storage location by clicking the button, the New dialog box and then click OK, see picture 

  • Then the control Adodc1 will be automatically attached to the sheet Form

  • To insert the Microsoft Data Grid Control component, version6.0 in sheet form, the same way as step 1 to? only different control name only.
  • Then you adjust the position of the components are attached to the sheet Form as shown belo

      Adodc1 next connect to the MFC AppWizard project sheet form,database that you create can be connected to the Form, how to follow step - a step below
      • connection  Adodc1  to Database
      1. Right-click on the control Adodc1 ADODC then click Properties Adodc Object, then the Tab All you click the button, on the columns  ConectionString 
      Then you right click again on the control you selected ADODC Adodc1 Adodc Object Properties, in dialog box Microsoft ADO Data Control Version 6.0, click the Build button on the Tab Control, and then the box
      Data Link Properties dialog specify the name of the server and database, see



      • connection  Datagrid1 to Adodc1
      1. Right-click on the DataGrid control and then click Edit DataGrid  Object, then the Tab All you click on the column Data Sources, the  Then select IDC_ADODC1





      All Tutorial and Article, Tutorial, Article

      6 comments: