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

I use ADODC and ADODB together i have got a problem;

38
Hallo friends!

like I ask you befor I try to use both the connection but highlite this code

Call Adodc1.Recordset.ActiveConnection

I need to open this query by using button click. like usual I need your support please .
Thank you in advance
Expand|Select|Wrap|Line Numbers
  1. Dim cn As New ADODB.connection
  2. Dim rs As New ADODB.Recordset
  3.  
  4. Private Sub cmdnext_Click()
  5. rs.MoveNext
  6. If rs.BOF Then rs.MoveNext
  7. rs.EOF = rs.MoveFirst
  8. MsgBox "go to next record", vbInformation
  9. Call Adodc1.Recordset.ActiveConnection
  10. End Sub
  11.  
  12. Private Sub cmdshow_Click()
  13. Set cn = New ADODB.Connection
  14. cn.Provider = "Microsoft.jet.oledb.4.0; "
  15. cn.Open "C:\HRMS\RTAHR "
  16. Set rs = New ADODB.Recordset
  17. rs.Open "select*from qryage", cn, adOpenDynamic, adLockOptimistic
  18. Show
  19. Call Adodc1.Recordset.ActiveConnection
  20. End Sub
Feb 15 '08 #1
4 1242
debasisdas
8,127 Expert 4TB
What is the problem with the code ?

What type of file is this ?

C:\HRMS\RTAHR
Feb 15 '08 #2
alem
38
hi
It is the path name let me explain

c:\HRMS\RTHRMS is the path

c: drive name
HRMS is the folder name
RTAHR is the database name
Feb 15 '08 #3
lotus18
866 512MB
hi
It is the path name let me explain

c:\HRMS\RTHRMS is the path

c: drive name
HRMS is the folder name
RTAHR is the database name
Hi

You've forgot to add its file extension. (RTAHR ) : )

Rey Sean
Feb 15 '08 #4
debasisdas
8,127 Expert 4TB
hi
It is the path name let me explain

c:\HRMS\RTHRMS is the path

c: drive name
HRMS is the folder name
RTAHR is the database name
What type of database is that ?
Feb 15 '08 #5

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

Similar topics

4
by: jaz215 | last post by:
hi! how do i add a record in a database without using the datacontrol and adodc. i want to rework my code to using purely codes and not being dependent on the design on vb. so far i have. Set rs...
4
by: alem | last post by:
Hallo friends! PlS help me I got confused. Can I use ADODC and ADODB together if I can; I already applied ADODC in my database file. How to use mathimatical functions and other code shall I use...
1
by: yosh29rs | last post by:
I have been using Adodc recently to link my system in vb6 to my detabase until our professor required us recently to use SQL which is completely new to me and ive never encountered before. How is it...
6
by: hussainiyad | last post by:
Hi all, I,m new to vb.6.0 and i don,t know how to connect to sql server through v.b 6.0 with the help of adodc control, and anyone plz tell me how connect and insert ,update,delete and other...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.