473,503 Members | 12,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET ASP.NET prob

hi...i am getting a error here...saying :
**quote**
The ConnectionString property has not been initialized.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.InvalidOperationException: The
ConnectionString property has not been initialized.
**quote**

i am tryign to connect to a Access db to retieve info to a
repeater using VB.NET...
i dont how to initailize the connection...
i am doin it like so :
<code>
Dim DS As DataSet
Dim MyConnection As New
System.Data.SqlClient.SqlConnection()
Dim MyCommand As
System.Data.SqlClient.SqlDataAdapter

MyConnection = New
System.Data.SqlClient.SqlConnection
(System.Configuration.ConfigurationSettings.AppSet tings
("G:\intouch"))
MyCommand = New
System.Data.SqlClient.SqlDataAdapter("select * from
UserID", MyConnection)

DS = New DataSet()
MyCommand.Fill(DS, "UserID")
</code>
i think the prblem lies in here :
MyConnection = New System.Data.SqlClient.SqlConnection
(System.Configuration.ConfigurationSettings.AppSet tings
("G:\intouch"))
....i think i am doin somethin wrong here...can someone pls
help????tks...
Nov 18 '05 #1
4 1544
Hi,

you should use OLEDB namespace in order to connect Access DB.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
could you gimme some example or links pls??
i am very new in this....
Nov 18 '05 #3
string connection;
connection = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\Inetpub\\wwwroot\\xxx\\Daten\\Test.mdb" ;
OleDbConnection oConn = new OleDbConnection(connection);
try
{
oConn.Open();
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
Check out:
http://aspnet101.com/aspnet101/aspne...px?code=simple

This page shows connections to SQL Server and Access

David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
"jophrthomas" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
hi...i am getting a error here...saying :
**quote**
The ConnectionString property has not been initialized.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.InvalidOperationException: The
ConnectionString property has not been initialized.
**quote**

i am tryign to connect to a Access db to retieve info to a
repeater using VB.NET...
i dont how to initailize the connection...
i am doin it like so :
<code>
Dim DS As DataSet
Dim MyConnection As New
System.Data.SqlClient.SqlConnection()
Dim MyCommand As
System.Data.SqlClient.SqlDataAdapter

MyConnection = New
System.Data.SqlClient.SqlConnection
(System.Configuration.ConfigurationSettings.AppSet tings
("G:\intouch"))
MyCommand = New
System.Data.SqlClient.SqlDataAdapter("select * from
UserID", MyConnection)

DS = New DataSet()
MyCommand.Fill(DS, "UserID")
</code>
i think the prblem lies in here :
MyConnection = New System.Data.SqlClient.SqlConnection
(System.Configuration.ConfigurationSettings.AppSet tings
("G:\intouch"))
...i think i am doin somethin wrong here...can someone pls
help????tks...

Nov 18 '05 #5

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

Similar topics

6
2743
by: josephrthomas | last post by:
hi..i am trying to make a login page and i am using access table.. when the user enters his userid and password i want to check the password from the table.. if any user with the userID that is...
29
5701
by: Thomas | last post by:
Hi I have an XSL stylesheet: <xsl:for-each select="TRACKS/TRACK"> <tr class="TDL"> <td width="90%"><xsl:number value="position()" format="1" /> - <xsl:value-of select="TRACKTITLE"/></td>...
5
4965
by: David Sobey | last post by:
Hi Sorry bout this basic prob. Got a file called file.obj. tryna read the first line from it as a string and print it to the screen. getting errors: #include "stdafx.h" #include <stdio.h>...
2
1405
by: Dishan Fernando | last post by:
Hi my prob is like this.. ----------------------------- create table ax( i int , j int ) create table ay( i int ,
15
1551
by: Raj | last post by:
Hello all: We have a table with about 2400 cells. Our requirement is to highlight the cells in the table whose data has changed, every 5 seconds. Our script behaves relatively ok in Firefox, but...
6
3672
by: skubik | last post by:
Hi everyone. I'm attempting to write a Javascript that will create a form within a brand-new document in a specific frame of a frameset. The problem is that I can create the form and input...
2
1814
by: Wilhelm Kutting | last post by:
hi, i like to solve a code-prob: tidy is bitching about <...> proprietary attribute "type" <...> lacks "action" attribute how can i make this nice? this is my code
28
2686
by: Vishal Naidu | last post by:
i m new to the C world... i ve been told by my instructors not to use goto stmt.. but no one could give me a satisfactory answer as to why it is so.. plz help me out of this dilemma, coz i use...
0
1391
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
2
1506
by: mnacw | last post by:
Can anybody help me to resolve this prob. i have installed Visual Studio 2005 Professional edition. I am working in VB.Net. When I tried to connect to database it is connected but when i make some...
0
7212
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,...
0
7098
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
7364
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...
1
7017
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
7470
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
4696
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...
0
3186
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...
0
1524
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 ...
0
405
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...

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.