473,788 Members | 2,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change ConnectionStrin g for DataSet at runtime?

Hi. I'm new in VB.NET. I would like to ask a question.
How to change ConnectionStrin g for DataSet at runtime?
Because I want to change the dBase data file directory according to the
program installed directory of user choice.
The DataSet is created using wizard at design-time.

Thanks for your help.
Aug 3 '06 #1
4 12498
ag
u need to create dataset at runtime

Aug 3 '06 #2
thank you very much!

ag wrote:
u need to create dataset at runtime


--

Aug 3 '06 #3
A few things:

Datasets don't have connection strings, connection objects do.
Datasets can contain table adapters, which in turn can have connection
objects associated with them.

You need only to change the ConnectionStrin g property of the connection
object that is used to fill your dataset.

wilson wrote:
Hi. I'm new in VB.NET. I would like to ask a question.
How to change ConnectionStrin g for DataSet at runtime?
Because I want to change the dBase data file directory according to the
program installed directory of user choice.
The DataSet is created using wizard at design-time.

Thanks for your help.
Aug 3 '06 #4
Let me try. Thank you.

Jerry H. wrote:
A few things:

Datasets don't have connection strings, connection objects do.
Datasets can contain table adapters, which in turn can have connection
objects associated with them.

You need only to change the ConnectionStrin g property of the
connection object that is used to fill your dataset.

wilson wrote:
Hi. I'm new in VB.NET. I would like to ask a question.
How to change ConnectionStrin g for DataSet at runtime?
Because I want to change the dBase data file directory according to
the program installed directory of user choice.
The DataSet is created using wizard at design-time.

Thanks for your help.


--

Aug 4 '06 #5

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

Similar topics

4
1130
by: Grant Stanley | last post by:
I'm developing an application in VS.Net 2003 using C#, which uses Crystal Reports. When creating each report, crystal asks where the database to use is, so I specify our SQL server using the ADO option. The problem is that these database settings seem to get compiled into the report, so when we take the application to our client it won't work on their systems. Before running each report I run some code which is ment to reset the...
1
2089
by: Jim | last post by:
After clicking on a row in a dataGrid, how do I change which tab is showing? I want to switch from tab1 to tab3. thanks
2
3061
by: Gwl | last post by:
I'm writing an application in which the user can change the default ouput language while the program is running. I have no problem to do it when there is only a form opened, but if I have a situation like a second form opened I don't know how I could change the otuput language in the main form and in all the background forms. Any advice? Thanks, G.
2
14973
by: Fredrik Rodin | last post by:
Hi! I need to be able to change, add or remove items in the QueryString. Let say I have the following scenario: Page_1.aspx display a dropdown list. This list is post-back enabled. It can also change the selected item by requesting the querystring ?color=red. If I browse to the page via the link
1
1943
by: TeeCo | last post by:
Hi folks. I'm trying to change the location of the Access mdb file I connect to using OleDb and am having trouble. I'm using Visual C# 2005 and the default values I use for the ConnectionString are those generated by the Server Explorer. I can connect just fine using the default values. But when I comment out strDefaultConnectionFile and uncomment the dbName variable I get: 'OleDbException: Could not use "; file already in use.' ...
2
5558
by: Eric Fortin | last post by:
I have a DataGridView that I bind to a dataset at runtime (I do not set up the data grid view for binding to that specific dataset at design time) and I want to save the manually resized column widths so that next time the user uses the screen, I can reset the width to what they manually made the last time they were in the screen. The problem is that no matter what I do, the width always returns to the original width of the column. I can...
0
1214
by: menno.abbink | last post by:
Hi All, I'm asked to come up with a sollution for the following: We are developing an application that will be displayed on a videowall ( at least 4000 x 2000 pixels) that will be used to monitor the actual state of several objects. We are thinking of using Scalable Vector Graphics to display the objects and the relations between them. The application needs to change the color of the objects whenever an event occurs (e.g. network link...
1
5352
soulstace
by: soulstace | last post by:
Hi all, I have a project with two forms. Call them form1 and form2. On form1, I have a notifyIcon which appears in the system tray when the application starts. On form2, I have a textbox, browse button, and an openFileDialog. Now,
0
1449
by: pankajol82 | last post by:
Hi all I am using following code to change regional setting at run time its not giving any error but at the same time the format of date is not changing. Dim DateFormat As New System.Globalization.DateTimeFormatInfo DateFormat.ShortDatePattern = "mm/dd/yyyy" Please help me
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8993
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.