-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: laks_win
Message 4 in Discussion
Hi
Notes:
Here, u have to remove the "Primary Key constraint"
for the field "Id", if u have there.Bcz it violates the insertion of the
DUPLICATE values in the field "Id"
Sample
1)select * from
openrowset('microsoft.jet.oledb.4.0','C:\Documents and
Settings\Lakshmi\Desktop\Whidbey\test.mdb';'Admin';,Table1)
2)select * from openrowset('microsoft.jet.oledb.4.0','C:\Documents and
Settings\Lakshmi\Desktop\Whidbey\test.mdb';'Admin';'',Table1)
3)select * from openrowset('microsoft.jet.oledb.4.0','C:\Documents and
Settings\Lakshmi\Desktop\Whidbey\test.mdb';'Admin';'','select * from
Table1')
4)select * from
openrowset('MSDASQL','Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Documents
and Settings\Lakshmi\Desktop\Whidbey\test.mdb;uid=;pwd=','select * from
Table1')
-- its not working
--select * from
openrowset('MSDASQL','Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Documents
and Settings\Lakshmi\Desktop\Whidbey\test.mdb;uid=;pwd=',Table1)
set identity_insert table1 on
select * from table1
insert into table1 (id,name)
select tab.* from
openrowset('microsoft.jet.oledb.4.0','C:\Documents and
Settings\Lakshmi\Desktop\Whidbey\test.mdb';'Admin';,Table1) as
tab
Hope, this helps.
Regards
Lakshmi Narayanan.R
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]