? win32::ODBC SQL 
Author Message
 ? win32::ODBC SQL

1: What's the SQL command to delet an entire table (from an
Acess database), i.e. the opposite of CREATE TABLE?

2: I've got a program in which I have:

# pseudocode:

&someSQLCall();
while($DB->FetchRow()) {
  %art= $DB->DataHash();
  # Do stuff;
  &SQLAddRecord();

Quote:
}

The obvious problem is that the SQL call inside the loop
screws up the FetchRow that should be from the first call.
What's the best workaround/solution?
Should I open two connections?

--bradj.
------------------------Nullus Oppidenda Est--------------------------

http://www.*-*-*.com/ ~bgjohnso/             'Chickens! No Cynics!'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Tue, 11 Jan 2000 03:00:00 GMT  
 ? win32::ODBC SQL

Quote:

> 1: What's the SQL command to delet an entire table (from an
> Acess database), i.e. the opposite of CREATE TABLE?

   Drop table xxx'

Quote:

> 2: I've got a program in which I have:

> # pseudocode:

> &someSQLCall();
> while($DB->FetchRow()) {
>   %art= $DB->DataHash();
>   # Do stuff;
>   &SQLAddRecord();
> }

> The obvious problem is that the SQL call inside the loop
> screws up the FetchRow that should be from the first call.
> What's the best workaround/solution?
> Should I open two connections?

   with ODBC  create two connections;

     while($1->FetchRow() ) {
      %art = $1->DataHash();
       ## process stuff
     $2->Sql("update xxx set pts=23 where krec=$art{$fld2}");
   }

   check the example program that comes with ODBC for more details

- Show quoted text -

Quote:

> --bradj.
> ------------------------Nullus Oppidenda Est--------------------------


> http://www.amherst.edu/~bgjohnso/             'Chickens! No Cynics!'
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Wed, 12 Jan 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Win32::ODBC, Perl SQL vs. standard SQL

2. LONG: Req: Help in retrieving values from SQL Server stored procedure using Win32::ODBC

3. Q: Can't connect to SQL data source name via Win32::ODBC API

4. looping through an sql query using win32::odbc

5. Win32:ODBC and Microsoft's SQL Server 6.5

6. SQL error 170 using Win32::ODBC

7. SQL Pass-thru query with Win32::ODBC?

8. Win32::ODBC and Sql

9. Win32::ODBC and transactions with SQL Server

10. SQL & win32::ODBC

11. SQL Server 7 and Win32::ODBC perl module

12. Win32::ODBC strangeness with SQL Server databases?

 

 
Powered by phpBB® Forum Software