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!
Printable View
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!
Make sure the field is not a logical, (Yes/No, boolean, etc), Memo, or Image type.
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
Thanks for your help! It was just a big mistake! I just replaced the comma with & in this line:
"FROM M_INDICA ", _
Thanks again!