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

typedataset not defined in System.Data.OleDb?

Dan
Hi,

I try to use dataset with OLEdb Access, but dataset is not defined (asp.net
2.0) when using VWD.

Imports System.Data.OleDb
Dim a As GridView
Dim d As OleDbDataAdapter
Dim ds As DataSet

Dim oConnection As OleDbConnection
oConnection = New OleDbConnection()

Dim comd As OleDbCommand
Dim sql As String
sql = "SELECT ...;"

Dim sConnectionString As String
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source
= c:\mydb.mdb"
d = New OleDbDataAdapter(sql, sConnectionString)
ds = New DataSet()
a = New GridView

da.Fill(ds, "field1")
a.DataSource = ds
a.DataBind()
oConnection.Close()

Thanks
May 23 '06 #1
1 1477
Dan
I found it.
Imports system.data and not only system.data.oledb
....

"Dan" <xx*@ddd.fv> wrote in message
news:uU*************@TK2MSFTNGP04.phx.gbl...
Hi,

I try to use dataset with OLEdb Access, but dataset is not defined (asp.net 2.0) when using VWD.

Imports System.Data.OleDb
Dim a As GridView
Dim d As OleDbDataAdapter
Dim ds As DataSet

Dim oConnection As OleDbConnection
oConnection = New OleDbConnection()

Dim comd As OleDbCommand
Dim sql As String
sql = "SELECT ...;"

Dim sConnectionString As String
sConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = c:\mydb.mdb"
d = New OleDbDataAdapter(sql, sConnectionString)
ds = New DataSet()
a = New GridView

da.Fill(ds, "field1")
a.DataSource = ds
a.DataBind()
oConnection.Close()

Thanks

May 23 '06 #2

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

Similar topics

2
by: PeteZ | last post by:
what using . . . . statement do I need to get this value (CommandType.StoredProcedure) defined ? even when I have defined the using statements: using System; using System.Data.SqlClient;...
0
by: silesius | last post by:
I've been using VS 2003 to develop a webapplication using C#. Today I exported the application to a remote webserver I begun experiencing problems. It's a simple application that retrieves some...
1
by: T8 | last post by:
I have a asp.net (framework 1.1) site interfacing against SQL 2000. It runs like a charm 99% of the time but once in a while I get the following "unspecified error". Sometimes it would resolve by...
0
by: silesius | last post by:
I've been using VS.NET 2003 to develop a webapplication using C#. Today I exported the application to another webserver I begun experiencing problems. It's a simple application that retrieves...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
0
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at...
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
5
by: scheidel21 | last post by:
I am writting a DB front end in VB.NET 2003 I have a form that displays employee information it has a dataset loaded from the DB that also includes tables for lookup in some comboboxes that are...
1
by: ErikJL | last post by:
I have a simple webservice that performs a SELECT query against a database, and then an INSERT statement on the same database/table. The problem arises at the time when we create the second OleDB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
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...

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.