Hi
I'm trying to write the data in excel using php odbc function.
when i inserting the records the following errors appear.
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Excel Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in D:\wamp\www\extra\timepicker\logfile.php on line 18
Warning: odbc_result_all(): supplied argument is not a valid ODBC result resource in D:\wamp\www\extra\timepicker\logfile.php on line 19
while using select query its works fine.
Pls Help regarding of this.
My Code is
$connect_odbc=odbc_connect("city","","");
$odbc_table=odbc_tables($connect_odbc);
while(odbc_fetch_row($odbc_table))
{
$result=odbc_result($odbc_table,"Table_Name");
// $sql="select * from [".odbc_result($odbc_table,"Table_Name")."]";
$sql="insert into [".odbc_result($odbc_table,"Table_Name")."] values ('$userid','$datetime','','')";
$records=odbc_exec($connect_odbc,$sql);
odbc_result_all($records);
}
i used microsoft excel driver[*.xls] for odbc.