Current location: Hot Scripts Forums » Programming Languages » PHP » php - copy ACCESS db.


php - copy ACCESS db.

Reply
  #1 (permalink)  
Old 04-04-05, 10:23 AM
feffik feffik is offline
Newbie Coder
 
Join Date: Mar 2004
Location: NL
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
php - copy ACCESS db.

Hi, I have a question about using php with a MS access db.

I want to copy some data from 1 database to another.
I got the code for this, mostly it works fine. But the problem is that with some data it doesn't copy all the data. It leaves out a row or something like that. or more then 1. Anyone got an idea to fix this???

///code

$sql="SELECT * FROM A";
$rf=odbc_exec($conn,$sql);
echo 'copying table A<BR>';
while (odbc_fetch_row($rf)){

$afd=odbc_result($rf,"AFD");
$naam=odbc_result($rf,"NAAM");



$wt = "insert into A (AFD, NAAM) values ('$afd', '$naam')";
odbc_exec($conn2, $wt);
}

/// end code

thnx.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with inserting values into an access db pinochio53 ASP 1 03-29-05 01:53 PM
PHP scripts unable to connect to DB after MySQL 4.1.10 upgrade Jason L PHP 3 03-08-05 01:32 AM
How do i Connect to other Databases (like Access, SQL Server) using PHP? EvilDeveloper PHP 3 02-22-05 08:28 AM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 12:19 PM
Using PHP to allow access to file downloads after user pays jmcclin2 PHP 2 03-11-04 10:28 AM


All times are GMT -5. The time now is 08:45 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.