Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,209 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 924 people online right now. Registration is fast and FREE... Join Now!




connect vb with access without using abodc.....

 
Reply to this topicStart new topic

connect vb with access without using abodc.....

vikas1111
post 21 Feb, 2008 - 02:14 AM
Post #1


New D.I.C Head

*
Joined: 20 Feb, 2008
Posts: 2

Hi everybody ..
I am a newbie to visual basic .. I want to know how to connect visual basic to access database withuot using adodc.. I would like to know what are the settings i need to make and the code i have to kee in..
This is the code which i have written..
Dim c As ADODB.Connection
Dim rs As New ADODB.Connection
Private Sub Form_Load()
Dim cs As String
Set myconn = New ADODB.Connection
myconn.ConnectionString = "provider=microsoft.jet.oledb.4;"
dbpath = "d:/name of the file.mdb"
rs.Open "select * from name of the table which i want to access", c, adOpenStatic
Me.Text1.Text = rs(no.of column)
End Sub


ERROR I AM GETTING IS INVALID PROPERTY ASSIGNMENT


This post has been edited by vikas1111: 21 Feb, 2008 - 04:07 AM
User is offlineProfile CardPM

Go to the top of the page

nealgabriel45
post 22 Feb, 2008 - 03:22 AM
Post #2


New D.I.C Head

Group Icon
Joined: 22 Oct, 2007
Posts: 46



Dream Kudos: 50
My Contributions


The Code you have provided is wrong.
To Proceed with, We need
a Connection Object
a RecordSet Object
-----------------------------
Please verify the following snippet.

http://www.dreamincode.net/code/snippet1689.htm

If you have any doubts please revert back
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 07:45PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month