Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 PLEASE HELP ME

Author  Topic 

baba1771
Starting Member

3 Posts

Posted - 2011-04-01 : 04:57:10
Im a newbie using sql server pls help me thank in advance

I would like to insert data from sql server to msaccess i encountered some error in my sql command Thank you very much....

INSERT INTO OpenDataSource('Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\DENGUE.mdb;')... dengue (FIRSTNAME, AGEYEARS, REGION) SELECT FIRSTNAME, AGEYEARS, REGION FROM DENGUE

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2011-04-01 : 13:17:28
post the error
Go to Top of Page

baba1771
Starting Member

3 Posts

Posted - 2011-04-03 : 21:54:08
Error message: Incorrect syntax near ')'.

Thank you for the reply
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2011-04-03 : 22:06:41
Provider name and init_string are two parameters; you combined them into one. Change it to this:
INSERT INTO OpenDataSource('Provider=Microsoft.Jet.OLEDB.4.0','Data Source="C:\DENGUE.mdb"')... dengue (FIRSTNAME, AGEYEARS, REGION) 
SELECT FIRSTNAME, AGEYEARS, REGION FROM DENGUE


Syntax here: http://msdn.microsoft.com/en-us/library/ms179856.aspx
Go to Top of Page

baba1771
Starting Member

3 Posts

Posted - 2011-04-04 : 00:36:50
thanks but now my porblem is Provider=Microsoft.Jet.OLEDB.4.0" has not been registered.

Im using sqlserver 2008 R2 and ms access 2007

Thanks

Go to Top of Page
   

- Advertisement -