Solved

adoConnection.Execute  -  easy question

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Specify ip address in my connection string for sas 2 60
to transfer string from C lanaguage to VBA 4 66
Copy a row 12 62
Set email body to html using vbscript 6 42
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

803 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