473,385 Members | 1,912 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,385 software developers and data experts.

Dataset error. Why?

Hello,

I have a dataset in an ASP.NET/VB web site.

Here is the aspx code:

Function dsContent(ByVal page As String, ByVal name As String) As
System.Data.DataSet

Dim connectionString As String =
System.Configuration.ConfigurationSettings.AppSett ings.Get("connectionString");
Dim dbConnection As System.Data.IDbConnection = New
System.Data.OleDb.OleDbConnection(connectionString )

Dim queryString As String = "SELECT [t_content].* FROM [t_content]
WHERE (([t_content].[page] = @page) AND ([t_content].[name] = @name))"

Dim dbCommand As System.Data.IDbCommand = New
System.Data.OleDb.OleDbCommand

dbCommand.CommandText = queryString

dbCommand.Connection = dbConnection

Dim dbParam_page As System.Data.IDataParameter = New
System.Data.OleDb.OleDbParameter

dbParam_page.ParameterName = "@page"

dbParam_page.Value = page

dbParam_page.DbType = System.Data.DbType.String

dbCommand.Parameters.Add(dbParam_page)

Dim dbParam_name As System.Data.IDataParameter = New
System.Data.OleDb.OleDbParameter

dbParam_name.ParameterName = "@name"

dbParam_name.Value = name

dbParam_name.DbType = System.Data.DbType.String

dbCommand.Parameters.Add(dbParam_name)

Dim dataAdapter As System.Data.IDbDataAdapter = New
System.Data.OleDb.OleDbDataAdapter

dataAdapter.SelectCommand = dbCommand

Dim dataSet As System.Data.DataSet = New System.Data.DataSet

dataAdapter.Fill(dataSet)

Return dataSet

Here is my web.config file:

<appSettings>

<add key="connectionString" value="Provider=Microsoft.Jet.OLEDB.4.0;
Ole DB Services=-4; Data Source=C:\_database\myDatabase.mdb" />

</appSettings>

The error I got is in this line:

Dim connectionString As String =
System.Configuration.ConfigurationSettings.AppSett ings.Get("connectionString");

And the error is: BC30037: Character is not valid.

Can someone tell me what is wrong here?

Thanks,

Miguel
Nov 19 '05 #1
0 996

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

Similar topics

6
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
2
by: Programatix | last post by:
Hi, I'm working on a project which includes WebServices and Windows Form application. The Windows Form application will call the WebServices to retrieve data from database. The data will be...
8
by: Programatix | last post by:
Hi, I'm working on a project which includes XML WebServices and Windows Form application. The Windows Form application will call the XML WebServices to retrieve data from database. The data...
1
by: Bob Skutnick | last post by:
Help.... I've created an ADO.NET dataset in Visual Studio (a web project). I build the project and then try to create a Crystal Report using the dataset. When I try to use the ADO.NET dataset...
9
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...
17
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
1
by: J. Askey | last post by:
I am implementing a web service and thought it may be a good idea to return a more complex class (which I have called 'ServiceResponse') in order to wrap the original return value along with two...
8
by: Harry Strybos | last post by:
Visual Studio 2005 - SP1 - VB.Net on WinXP SP2 I add a typed dataset to my solution and get the following errors : Error 1 sub 'ReadXmlSerializable' cannot be declared 'Overrides' because it...
3
by: leviwatts | last post by:
Exception Details: System.ArgumentException: DataTable already belongs to another DataSet. Googling for this error shows several post of people trying to manipulate a table within a dataset. Others...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...

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.