Property Pages General Source of Connection C Use Data Link File Browse o Use ODBC Data Source Name New Use Connection String Build Other Attributes OK anc Apple Help 2021/2/20 Information College. ChangJun
26 2021/2/20 Information College · ChangJun
使用数据连接文件 这个选项指定一个连接到数据源的自定义的 连接字符串 单击旁边的“浏览”按钮可以选择一个连接 文件 >使用ODBC数据源名称 令这个选项允许使用一个系统定义好的数据源 名称 (DSN)来作为连接字符串 心可以在组合框中的数据源列表中进行选择, 使用旁边的“添加”按钮可以添加或修改DSN 2021/2/20 Information College. ChangJun
27 2021/2/20 Information College · ChangJun ➢ 使用数据连接文件 ❖这个选项指定一个连接到数据源的自定义的 连接字符串 ❖单击旁边的“浏览”按钮可以选择一个连接 文件 ➢ 使用ODBC数据源名称 ❖这个选项允许使用一个系统定义好的数据源 名称 (DSN)来作为连接字符串 ❖可以在组合框中的数据源列表中进行选择, 使用旁边的“添加”按钮可以添加或修改DSN
>使用连接字符串 小这个选项定义一个到数据源的连接字符单一 ◇单击“生成”按钮弹出“数据连接属性”对 话框 ☆在这个对话框中可以指定提供者的名称、 连 五 Link Properties Provider I Connection I Advanced I All Select the data you want to connect to OLE DB Provider(s) Microsoft Jet. 3. 51 OLE DB Provider Microsoft o ovider for ODBC D Microsoft oLE DB Provider for soL Server Microsoft OLE DB Simple Provider MSDataShape Ne对y> 2021/2/20 OK Cancel Help
28 2021/2/20 Information College · ChangJun ➢ 使用连接字符串 ❖这个选项定义一个到数据源的连接字符串 ❖单击“生成”按钮弹出“数据连接属性”对 话框 ❖在这个对话框中可以指定提供者的名称、 连接以及其它的要求信息
连接到数据源(续) Provider Connection Advanced I All Specify the following to connect to Access data 1. Select or enter a database name C: \Program Files \Microsoft Visual Studio\VB98\Nwind. E 2. Enter information to log on to the database Password M Blank password Allow saving of password OK Cancel Help 2021/2/20 Information College. ChangJun
29 2021/2/20 Information College · ChangJun 连接到数据源(续)
3、记录源( RecordSource)属性 在建立到数据库的连接之后,记录源属性指 定记录从何而来 属性指定为一个 今表的名称 存储过程 SQL语句 2021/2/20 Information College. ChangJun
30 2021/2/20 Information College · ChangJun 3、记录源(RecordSource)属性 ➢ 在建立到数据库的连接之后,记录源属性指 定记录从何而来 ➢ 属性指定为一个 ❖表的名称 ❖存储过程 ❖SQL语句