Solved

adoConnection.Execute  -  easy question

Posted on 2002-07-05
3
194 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

792 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