【正文】
英文文獻(xiàn)翻譯 題 目 : Visual Basic 程序設(shè)計課程教學(xué)網(wǎng)站的設(shè)計與 實現(xiàn) 姓 名 : 學(xué) 院 : 計算機與信息工程學(xué)院 專 業(yè) : 計算機科學(xué)與技術(shù) 班 級 : 學(xué) 號 : 指 導(dǎo)教師 : 職稱 :講師 Visual Basic Database ConnectivityAn Introductory Guide 1. Create the VB .Net Application Create a blank VB .Net solution in your account and add a newproject to the solution. This should automatically create a blankform for you. Also copy the database file from the COMP315 library folder into your account. 2. Using Data Adapters and Data Sets To manipulate data in an access database you need to use a data adapter to connect to the database and a data set to manipulate the data. 3. Creating the Data Adapter To create a Data Adapter that contains the SQL statement you want to populate the dataset with, do the following: Click on the 39。Data39。 tab in the tool box and then double click on the OleDbDataAdapter control to add it into the form. The Data Adapter Configuration Wizard will automatically appear to help you configure the Data Adapter. Figure 1. Location of the Data tab in the toolbox. Click on Next to move to the next screen. Now the Data connection to use box should be blank so click on the New Connection button to configure the new connection. Select the Provider tab and then select Microsoft Jet OLE DB Provider and then click on Next. In section 1 where it asks for the database to use, click on the 39。…39。 button and then navigate to and select the database and click on the Open button.. Leave section 2 as it is. Your screen should look similar to this: Figure 2. Completed Data Link Properties. Click on the Test Connection button and you should get a message saying 39。Test Connection Succeeded39。. If you don’t then check you have followed the instructions above. Click on OK to return to the Data Adapter Wizard and then click on the Next button. Make sure that Use SQL statements is selected and then click on the Next button. In the large text box type in the following SQL statement: Select * from authors Then click on the Next button and then the Finish button. You may be asked if you want to include a password in the connection string, so just click on Don’t In