hey i am new to visual basic programming...just 15-20 days into it...
i wanna know how can i use command button to access the ms access files instead of using the data control....how can i do that????
i have tried a lot of things but to no effect .... please help me with this!!!!
i tried to find this solution in the solved threads but without any success.
mayank_ati
28
Junior Poster in Training
Recommended Answers
Jump to PostHi,
Add "Microsoft ActiveX objects 2.0" References to the project.
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=C:\MyDB.mdb;Persist Security Info=False" .Open End With ssql = "Select * from MyTable" Set rs=Nothing RS.Open ssql,AC If RS.EOF …
Jump to PostHi,
In continuation with above code:
If RS.EOF Then
' No Record Found
Else
text1.text = RS(0)
text2.text = RS(1)
text3.text = RS(2)
text4.text = RS(3)
text5.text = RS(4)
End If
Regards
Veena
Jump to Postwhat bout try yourself before ask for help and if possibel posting your code instead of asking for complete solution.
Jump to PostHi,
Check the following:
DB2 ADO Connection Object is open or not.
Declare RST
Dim RST As New ADODB.Recordset
Set RST=Nothing
RST.Open "select Project_Name,BU from Risk_Analysis", db2, adOpenStatic, adLockOptimisticRegards
Veena
All 15 Replies
QVeen72
104
Posting Shark
mayank_ati
28
Junior Poster in Training
QVeen72
104
Posting Shark
mayank_ati
28
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
mayank_ati
28
Junior Poster in Training
jireh
3
Posting Whiz
mayank_ati
28
Junior Poster in Training
jireh
3
Posting Whiz
mayank_ati
28
Junior Poster in Training
jireh
3
Posting Whiz
mayank_ati
28
Junior Poster in Training
QVeen72
104
Posting Shark
mayank_ati
commented:
thanks....
+1
mayank_ati
28
Junior Poster in Training
mayank_ati
28
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.