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

How to give Connection Provider using MS Access n asp.net 1.1

3
Hi,
I am trying to give database connection using access database but its showing following error

Fill: SelectCommand.Connection property has not been initialized

I written following code:
Sub getdetails()
Dim sql As String
sql = "select * from webContact"
da = New OleDbDataAdapter(sql, con)
ds = New DataSet
da.Fill(ds)

DataGrid1.DataSource = ds
DataGrid1.DataBind()
con.Close()

End Sub

MyConnection:
If con.State = ConnectionState.Closed Then

con = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLED B.4.0;Data Source=" & Server.MapPath("") & "\Dheens\dheenas.mdb")

con.Open()

End If
Jan 24 '07 #1
2 1293
radcaesar
759 Expert 512MB
try by add this

da.SelectCommand.Connection=con

:)
Jan 24 '07 #2
nmsreddi
366 256MB
hello

while using Access aas your first you have to give permissions to for accessing

the database ,check that security options from your control panel in that go to

administrative tools set there for your accessibility options
Jan 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: BP | last post by:
I get the following error: Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' /myweb4/authorised_user_page.asp, line 70 and line 70 of my code is: <% rsCheckUser1.Open...
6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
3
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
18
by: WStoreyII | last post by:
I am making a asp page that will run on my computer by iis. But the problem is the database in on a web server. I can not seem to get the connection to work for it though here his the connection...
14
by: Brad Allison | last post by:
Sorry to repeat myself if this is the same question I asked in the past, but I have finally made a connection to our AS400 through ODBC. I tried to get the connection using the data connection...
11
by: Art | last post by:
Hello again, Can anyone tell me the correct connection string to use? My database is on the E: drive of a remote server. I can either map a drive from my local machine to it, or use the...
1
by: Chris Love | last post by:
I have already asked this, but no one seems to know the answer. Here is the timeline. I wanted to use the membership/roles functionality in a site. I got all sorts of errors trying to get this...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
0
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
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...

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.