Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Setting the Connection String for a TableAdapter

RSS
Modified on Tue, Dec 01, 2009, 3:13 PM by Administrator Categorized as ·Net Framework
1. Open the DataSet designer (XSD file)

2. Select each table adapter of interest, and in the Properties Window set the ConnectionModifier property to Public.

Image

3. Wherever in code you need to set the connection string, do the following.

Dim ta as FoobarTableAdapters.FoobarTableAdapter
Dim conn as SqlConnection = New SqlConnection(connectionString)
conn.Open()
ta.Connection = conn

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.