All of a sudden I'm getting this error "argument is incorrect data type" any time the the file_add_to_db is encountered. It is not working with import or summaries.
Even if I do a very simple import or summary using a genie I get the same thing.
This started when I moved an entire directory containing my database to a new machine.
I had been running the scripts that are now not working for weeks with no problem.
Any ideas.
Here is a sample snippet of code-
'In case the destination table name is stored as a relative file name, or uses an alias
'in the drive/path specification, use the filename_decode() function to convert the
'filename to an absolute filename.
summarize_db_name = filename_decode("taxidsumtest.DBF")
tbl = table.open("prf_newer")
ON ERROR GOTO ERROR18112009120616722
sum.db = summarize_db_name
sum.db_dd_delete = .F.
sum.result_overwrite = .F.
sum.order = "STR(GROUP,6,0)"
sum.filter = "DEPOSITTIN>1000000"
sum.options = "I"
sum.fields = 3
sum.field1 = "GROUP"
sum.code1 = 0
sum.field2 = "DEPOSITTIN"
sum.code2 = 6
sum.field3 = "\"Filter\""
sum.code3 = 15
tbl.summarize()
GOTO CONTINUE18112009120616722
ERROR18112009120616722:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Summarize Operation"+crlf()+error_text_get())
END
CONTINUE18112009120616722:
tbl.close()
'Add the table just created by the Summarize operation to the Database..
file_add_to_db(summarize_db_name)
Even if I do a very simple import or summary using a genie I get the same thing.
This started when I moved an entire directory containing my database to a new machine.
I had been running the scripts that are now not working for weeks with no problem.
Any ideas.
Here is a sample snippet of code-
'In case the destination table name is stored as a relative file name, or uses an alias
'in the drive/path specification, use the filename_decode() function to convert the
'filename to an absolute filename.
summarize_db_name = filename_decode("taxidsumtest.DBF")
tbl = table.open("prf_newer")
ON ERROR GOTO ERROR18112009120616722
sum.db = summarize_db_name
sum.db_dd_delete = .F.
sum.result_overwrite = .F.
sum.order = "STR(GROUP,6,0)"
sum.filter = "DEPOSITTIN>1000000"
sum.options = "I"
sum.fields = 3
sum.field1 = "GROUP"
sum.code1 = 0
sum.field2 = "DEPOSITTIN"
sum.code2 = 6
sum.field3 = "\"Filter\""
sum.code3 = 15
tbl.summarize()
GOTO CONTINUE18112009120616722
ERROR18112009120616722:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Summarize Operation"+crlf()+error_text_get())
END
CONTINUE18112009120616722:
tbl.close()
'Add the table just created by the Summarize operation to the Database..
file_add_to_db(summarize_db_name)
Comment