473,938 Members | 17,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dataset and Web.Config. Help Needed. Thank You.

Hello,

I created a dataset in web matrix:

....
Dim connectionStrin g As String = "Provider=Micro soft.Jet.OLEDB. 4.0; Ole
DB Services=-4; Data Source=C:\myDat abase.mdb"
....

I want to place the connection in the Web.Config file:
<appSettings>
<add key="connection String" value="Provider =Microsoft.Jet. OLEDB.4.0;
Ole DB Services=-4; Data Source= myDatabase.mdb" />
</appSettings>

Then I used this code line:
Dim connectionStrin g As String =
System.Configur ation.Configura tionSettings.Ap pSettings("conn ectionString");

I tried in many ways but I can't make it work.

Can someone tell me what am I doing wrong or point me a resource where I
can read something about it?

Thanks,
Miguel

Nov 19 '05 #1
1 992
I just found what the problem was. Thanks anyway.

Cheers,
Miguel

"Shapper" <mdmoura*NOSPAM *@gmail.*DELETE 2SEND*com> wrote in message
news:mdmoura*NO SPAM*@gmail.*DE LETE2SEND*com:
Hello,

I created a dataset in web matrix:

...
Dim connectionStrin g As String = "Provider=Micro soft.Jet.OLEDB. 4.0; Ole
DB Services=-4; Data Source=C:\myDat abase.mdb"
...

I want to place the connection in the Web.Config file:
<appSettings>
<add key="connection String" value="Provider =Microsoft.Jet. OLEDB.4.0;
Ole DB Services=-4; Data Source= myDatabase.mdb" />
</appSettings>

Then I used this code line:
Dim connectionStrin g As String =
System.Configur ation.Configura tionSettings.Ap pSettings("conn ectionString");

I tried in many ways but I can't make it work.

Can someone tell me what am I doing wrong or point me a resource where I
can read something about it?

Thanks,
Miguel


Nov 19 '05 #2

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

Similar topics

8
2182
by: bearophileHUGS | last post by:
Hello, I have four things to ask or to suggest, sorry if they seem basic or already discussed. ------------------- I am still ignorant about Tkinter. This little program, after pressing the "Go" eats more and more RAM, is it normal? Can it be avoided? (In normal programs this is isn't a real problem). ! import Tkinter
1
2133
by: Linesh Gajera | last post by:
Hi Guys i having the same problem with Strongly typed dataset, I have created a stronsetly typed dataset by draging table from Server explorer and now i have retreived xml from SQL server 2000 and tried to populate dataset but it populates 0 rows even though ml contains rows. If i use regular Dataset instead of Typed dataset, then everything works just fine..please help me as soon as possible, here is my code snippet. I think you have...
0
1186
by: Anon | last post by:
I have an XML document that stores configuration settings for an app. I generated the schema using vs.net and also the corresponding dataset. I can load the config file (config.xml - below) and get all the data except for the element attribute values. I cannot figure out why the attribute values return a value of system.dbnull when the file contains values for those attributes. The code is as follows: config loader .vb 'Config is a...
4
4050
by: Zürcher See | last post by:
I have in a form a datagrid that display a dataset, but if I start a new thread that fill the dataset the program will crash, that's because the dataset is not synchronized, is not thread safe. I tryed to use the monitor.enter(dataset) and monitor.exit(dataset) befor updating the dataset but was useless. I think the problem is the paint method of the datagrid, that you can not override, so you can not synchronize the dataset. Also there...
9
2281
by: Dave | last post by:
Compilier will not recognize DataSet object. As you can see below is from a test simple form with no other code. I'm just trying to get any Aspx form to recognize the DataSet object. You can see from the code I am importing System.Data.SqlClient. I can get to DataReader, DataView and DataTable but Visual Studio won't even bring up DataSet on Intellisense, much less compile it. The message I get is: "Reference required to assembly...
15
2263
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
12
1702
by: Bishoy George | last post by:
I have a dataset called ds1 filled with 2 tables Employees and Customers from Northwind database. I have dropdownList called ddLastName with the following properties: ddLastName.DataSource = ds1; ddLastName.DataMember = "Employees"; ddLastName.DataTextField = "LastName"; ddLastName.DataBind(); ddLastName.Items.Insert(0,"Select:");
4
1493
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Why am I getting an error when I passed by ref a dataset to a new form? The message reads "cannot convert from 'ref Paimport.unixAccount' to 'ref System.Data.DataSet'. Paimport is the name of the form where the dataset UnixAccount is created. I created the dataset using the designer tool and not by code. So it's like a type or class which I then declare an instance of it : UnixAccoutns dsAccounts = new UnixAccoutns (); I pass to a new...
7
1753
by: =?Utf-8?B?TWF4R3J1dmVu?= | last post by:
I have a DLL that implements the Business and Data Layers for a number of different websites. That DLL uses a Strongly Typed DataSet to interface to the Data Source which is SQL Server. There is a connection string in the DLL that is causes me grief. It points at a particular instance of database. I hae to recompile the DLL for each WebSite. How can I re-use that DLL on different websites and have it point to different instances of...
0
10133
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
9963
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
11521
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
11104
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
10653
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6072
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6292
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4901
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
3
3498
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.