Solved

adoConnection.Execute  -  easy question

Posted on 2002-07-05
3
184 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
Comment Utility
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
Comment Utility
sorry, add

   Dim SQL As String
0
 

Author Comment

by:slavikn2
Comment Utility
That was enough:

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

762 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

15 Experts available now in Live!

Get 1:1 Help Now