Solved

adoConnection.Execute  -  easy question

Posted on 2002-07-05
3
188 Views
Last Modified: 2012-06-27
Hello,

Dim TempRS As Recordset
Set TempRS = DataEnvironment1.Connection1.Execute("SELECT * FROM Students")

"Students" is a table.
I get the following error: "Type mismatch"
Why doesn't it work?
0
Comment
Question by:slavikn2
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
ID: 7132363
Assuming you've opened the connection correctly, then try:

   Dim RS as ADODB.RecordSet
   
   SQL = "SELECT * FROM STUDENTS"
   Set RS = New ADODB.RecordSet
   RS.Open SQL, Connection1, adOpenForwardOnly
0
 
LVL 3

Expert Comment

by:PNJ
ID: 7132365
sorry, add

   Dim SQL As String
0
 

Author Comment

by:slavikn2
ID: 7132400
That was enough:

Dim TempRS As ADODB.Recordset
Set TempRS = DataEnvironment1.Connection1.Execute("SELECT * FROM Students")
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now