473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Component class - Get generated DataAdapters dynamically?

Hi all,

I created a new "Component Class" in a project (Add new... & choose
"Component Class"). When you get into Design Mode you see the message: "To
add components to your class, drag them from the Server Explorer...". If you
drag a table from a data source in the Server Explorer, the designer
generates a DataAdapter for the table, complete with the command objects
filled with the correct SQL code.

I need to know if there is a way to generate the exact same Data Adapter
programmatically at runtime using a custom database connection and a table
name.

Something like:
Dim x as new System.ComponentModel.Component
Dim a as SQLDataAdapter = x.GenerateAdapter(c as SQLConnection, tableName as
string)
....even thought this code is invalid.

I need to dynamically generate a DataAdapter on the fly, complete with its
command objects, for a given database table known at run-time only. I
thought of using the designer objects instead of dynamically generating the
code myself.

It would really save me some time would that be possible.

Thanks,

C
Feb 3 '07 #1
0 819

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: G. Dean Blake | last post by:
I have a project with many DataAdapters and Datasets generated via the Wizard. DAs and been deleted and more DAs have been added. The Generated code has become somewhat of a mess. Now when I...
8
by: YunusEmre | last post by:
Hi, I have a class named MyDataAdapter that derives from System.ComponentModel.Component and it contains all of my SqlDataAdapter objects(around a 100). How can I find a SqlDataAdapter in the...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.