I think you need to give us more information on what
you want to do and why. Reason being there are a lot
simpler ways to go about this. For example, you can
link to the SQL server tables in Access and just do an
append query using your Access connection. You can
have empty tables in Access and load them for
download. This code below populates an mdb using 2
connections, one to the SQL Server and one to an
Access table residing on the webserver. It's for
mailing labels for a specific countie's water systems.
It's in PHP, but just squint your eyes and pretend
it's C# :)
echo "<br><br><input type=\"button\" value=\"download
labels now\"
onclick=\"window.open('PWSMailingLabels.mdb');\">";
$dataSDWIS = odbc_do($connectionSDWIS, "SELECT
CountyServed, PWS, PWSName, Address, City + ', ' +
State + ' ' + Zip AS CityStateZip, ActivityStatus FROM
Inventory WHERE CountyServed =
'".$county."'".$activitystatus);
/* connect to access database*/
$connectionAccess =
odbc_connect("PWSMailingLabels","","");
if(!$connectionAccess) die("Couldn't connect");
odbc_do($connectionAccess,"DELETE * FROM
PWSMailingLabels");
do
{
odbc_do($connectionAccess,"INSERT INTO
PWSMailingLabels
VALUES('".odbc_result($dataSDWIS,1)."',
'".odbc_result($dataSDWIS,2)."',
'".str_replace("'","",odbc_result($dataSDWIS,3))."',
'".str_replace("'","",odbc_result($dataSDWIS,4))."',
'".odbc_result($dataSDWIS,5)."',
'".odbc_result($dataSDWIS,6)."',-1)");
} while(odbc_fetch_row($dataSDWIS));
--- osos_bahgat <[EMAIL PROTECTED]> wrote:
> Hi All
> I'm trying to transfere data from SQLServer to
> MSAccess
> I've built an oleDbConnection and sqlConnection with
>
> oleDbDataAdapters and SqlDataAdapters and a dataset,
> this is done by
> useing drag and drop from the tool box
> I'm viewing the data from the SQL Server into a
> dataGrid then I want
> to transfere it to Access database
> I've two buttons:
> btnGetData with this code:
> sqlDataAdapter1.Fill(dataSet1);
> sqlDataAdapter2.Fill(dataSet1);
>
> and the other button btnUpdate with code:
> oleDbDataAdapter1.Update(dataSet1, "Customers");
> oleDbDataAdapter2.Update(dataSet1, "Orders");
>
> but the update method doesn't work and there is no
> data transfere to
> the Access DB :(
> I think there is something missing in my code, can
> anyone help?
>
> thank you.
>
>
>
>
>
> Yahoo! Groups Links
>
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>
>
> [EMAIL PROTECTED]
>
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/