| | |
How can i access data from MS Access using VB6 (I need the connection code)
![]() |
Hi,
Get Connection String here:
http://www.connectionstrings.com/?carrier=access
Change the Path to Server Path.
Regards
Veena
Get Connection String here:
http://www.connectionstrings.com/?carrier=access
Change the Path to Server Path.
Regards
Veena
'using connection object
'in general section
dim conn as adodb.connection
dim rs as adodb.recordset
'in form load
set conn=new adodb.connection
set rs=new adodb.recordset
conn="provider=microsoft jet.4.0.oledb;data source=<ur database name>;persist security info=false"
conn.open
rs.open "select *from ur tablename",conn,adopendynamic,adlockoptimistic
'in general section
dim conn as adodb.connection
dim rs as adodb.recordset
'in form load
set conn=new adodb.connection
set rs=new adodb.recordset
conn="provider=microsoft jet.4.0.oledb;data source=<ur database name>;persist security info=false"
conn.open
rs.open "select *from ur tablename",conn,adopendynamic,adlockoptimistic
Hi,,
Add "Microsoft ActiveX objects 2.0" References to the project. Share the Folder in Server With Full Access.
use this code:
Dim rs As New ADODB.Recordset
Dim AC As New ADODB.Connection
With AC
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ServerName\ShareFolder\db1.mdb;Persist Security Info=False"
.Open
End With
ssql = "Select * from MyTable"
Set rs=Nothing
RS.Open ssql,AC
REgards
Veena
Add "Microsoft ActiveX objects 2.0" References to the project. Share the Folder in Server With Full Access.
use this code:
Dim rs As New ADODB.Recordset
Dim AC As New ADODB.Connection
With AC
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ServerName\ShareFolder\db1.mdb;Persist Security Info=False"
.Open
End With
ssql = "Select * from MyTable"
Set rs=Nothing
RS.Open ssql,AC
REgards
Veena
![]() |
Similar Threads
- VB6 and MS Access Problem (Visual Basic 4 / 5 / 6)
- MS Access and other applications on VB6.0 (Visual Basic 4 / 5 / 6)
- VB6 Access error Please Please Help !!! (Visual Basic 4 / 5 / 6)
- Pls help me regarding to access database in vb6 (Visual Basic 4 / 5 / 6)
- Change Access Title in VB6 (Visual Basic 4 / 5 / 6)
- VB6 and MS Access 2002 (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: .:: Web Login Help ::.
- Next Thread: sending mails using Visual Basic 6
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





