tags:

views:

58

answers:

2

I'm debugging an app with the following code:

sql = myTable
Set datTable.Recordset = myDB.openRecordset(sql, dbOpenDynaset, dbSeeChanges)

where

sql = "select * from table Order by Precipition,Date/Time"

An error occurs on the second line saying "Run-time error '3061': Too few parameters. Expected 2". I believe the issue is the with the value of sql. I don't know to much about SQL, so does anyone have any ideas?

+1  A: 

The problem is in your order clause: more specifically here:

Date/Time.

Kico Lobo
+2  A: 

I thingk you can try

sql = "select * from table Order by Precipition,[Date/Time]"

Note the "[]"

You should try to avoid using table names/columns that contains spaces, or keywords, as this will make life very dufficult.

Use name that explain the field in context to the table.

astander