473,836 Members | 1,449 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 12502
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
2091
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
3064
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
14974
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
1951
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
5562
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
1219
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
5356
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
9825
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
9672
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
10559
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...
1
10601
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7794
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
5829
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4460
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3116
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.