|
-
Nov 21st, 2000, 05:27 PM
#1
Thread Starter
Junior Member
HI,
I have some problems with this:
rs.Open "SELECT * " & _
"FROM M_INDICA ", _
"ORDER BY p_indica_gen", _
cn_OLAP, adOpenDynamic, adLockOptimistic
I always get this error : type mismatch
Can you help me!
Martin Nadeau, B.Sc.A.
Centre de recherche en géomatique
Université Laval
-
Nov 21st, 2000, 05:51 PM
#2
Hyperactive Member
Make sure the field is not a logical, (Yes/No, boolean, etc), Memo, or Image type.
-
Nov 21st, 2000, 07:18 PM
#3
Member
You can't split your sql string up that way. Either use example 1 or put all the sql string on one line as in example 2
(1)
Dim sql as String
sql = "SELECT * "
sql = sql & "FROM M_INDICA "
sql = sql & "ORDER BY p_indica_gen"
rs.Open sql, _
cn_OLAP, adOpenDynamic, adLockOptimistic
(2)
rs.Open "SELECT * FROM M_INDICA ORDER BY p_indica_gen", _
cn_OLAP, adOpenDynamic, adLockOptimistic
-
Nov 22nd, 2000, 12:16 PM
#4
Thread Starter
Junior Member
Select statement and Odrder By Clause
Thanks for your help! It was just a big mistake! I just replaced the comma with & in this line:
"FROM M_INDICA ", _
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|