updating visual foxpro tables via Linked server

updating visual foxpro tables via Linked server

Post by bruc » Sat, 04 Jan 2003 22:52:28



Hello,

I have linked a server to a visual foxpro datasource. I'm
having problems updating visual foxpro tables, I get this
message "command contains unrecognized phras/keyword".  
This is my sql string
update nis_data.[\\oracleserver\nis\nis]..salon
SET              priority = 'B'
WHERE     (priority LIKE '%A%')

what am I doing wrong?

 
 
 

updating visual foxpro tables via Linked server

Post by Allan Mitchel » Sat, 04 Jan 2003 23:05:57


I am guessing that it is throwing up on the [\\oracleserver\nis\nis]

You may want to read this for details of the syntax

HOWTO: Add a FoxPro Database to SQL Server as a Linked Server
PSS ID Number: Q199131

Article Last Modified on 07-27-2001

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


Quote:> Hello,

> I have linked a server to a visual foxpro datasource. I'm
> having problems updating visual foxpro tables, I get this
> message "command contains unrecognized phras/keyword".
> This is my sql string
> update nis_data.[\\oracleserver\nis\nis]..salon
> SET              priority = 'B'
> WHERE     (priority LIKE '%A%')

> what am I doing wrong?


 
 
 

updating visual foxpro tables via Linked server

Post by bruc » Sat, 04 Jan 2003 23:21:12


Quote:>-----Original Message-----
>I am guessing that it is throwing up on the

[\\oracleserver\nis\nis]

>You may want to read this for details of the syntax

>HOWTO: Add a FoxPro Database to SQL Server as a Linked
Server
>PSS ID Number: Q199131

>Article Last Modified on 07-27-2001

>--

>Allan Mitchell (Microsoft SQL Server MVP)
>MCSE,MCDBA
>www.SQLDTS.com
>I support PASS - the definitive, global community
>for SQL Server professionals - http://www.sqlpass.org



>> Hello,

>> I have linked a server to a visual foxpro datasource.
I'm
>> having problems updating visual foxpro tables, I get
this
>> message "command contains unrecognized phras/keyword".
>> This is my sql string
>> update nis_data.[\\oracleserver\nis\nis]..salon
>> SET              priority = 'B'
>> WHERE     (priority LIKE '%A%')

>> what am I doing wrong?

>.
>Hi Allan,

I read the article and I have already done everything in
the article.  When I use     update Openquery
(nis_data, 'select * from salon')set priority="B" where
priority="A", it works.  But I tried to use this same
statement in a ddq for my update statement like
this...update Openquery(nis_data, 'select * from salon')
set priority="B" where salonid =?  it does not work.  Can
you not use parameters with this?

Thanks a lot Allan, I've noticed that your support
contributes  a great deal to this site!

 
 
 

updating visual foxpro tables via Linked server

Post by bruc » Sat, 04 Jan 2003 23:31:09


Hi Allan,

I read the article and I have already done everything in
the article.  When I use     update Openquery
(nis_data, 'select * from salon')set priority="B" where
priority="A", it works.  But I tried to use this same
statement in a ddq for my update statement like
this...update Openquery(nis_data, 'select * from salon')
set priority="B" where salonid =?  it does not work.  Can
you not use parameters with this?

Thanks a lot Allan, I've noticed that your support
contributes  a great deal to this site!

>-----Original Message-----

>>-----Original Message-----
>>I am guessing that it is throwing up on the
>[\\oracleserver\nis\nis]

>>You may want to read this for details of the syntax

>>HOWTO: Add a FoxPro Database to SQL Server as a Linked
>Server
>>PSS ID Number: Q199131

>>Article Last Modified on 07-27-2001

>>--

>>Allan Mitchell (Microsoft SQL Server MVP)
>>MCSE,MCDBA
>>www.SQLDTS.com
>>I support PASS - the definitive, global community
>>for SQL Server professionals - http://www.sqlpass.org



>>> Hello,

>>> I have linked a server to a visual foxpro datasource.
>I'm
>>> having problems updating visual foxpro tables, I get
>this
>>> message "command contains unrecognized phras/keyword".
>>> This is my sql string
>>> update nis_data.[\\oracleserver\nis\nis]..salon
>>> SET              priority = 'B'
>>> WHERE     (priority LIKE '%A%')

>>> what am I doing wrong?

>>.
>>Hi Allan,

>I read the article and I have already done everything in
>the article.  When I use     update Openquery
>(nis_data, 'select * from salon')set priority="B" where
>priority="A", it works.  But I tried to use this same
>statement in a ddq for my update statement like
>this...update Openquery(nis_data, 'select * from salon')
>set priority="B" where salonid =?  it does not work.  Can
>you not use parameters with this?

>Thanks a lot Allan, I've noticed that your support
>contributes  a great deal to this site!
>.

 
 
 

updating visual foxpro tables via Linked server

Post by Allan Mitchel » Sun, 05 Jan 2003 00:09:29


OK

You can use an ExecuteSQL task.  Set the connection of the task to the VFP
connection (or if you want to use linked servers for the VFP then use the
OPENQUERY syntax)

You can use Lookups

How to Use Lookups in DTS
http://www.sqldts.com/default.aspx?6,107,277,7,1

Remember that these tasks are connection specific.  If you say you want a
VFP connection then you can use VFP syntax no need for OPENQUERY.  You will
only need  this if you want to go through SQL Server and linked servers.

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


> >-----Original Message-----
> >I am guessing that it is throwing up on the
> [\\oracleserver\nis\nis]

> >You may want to read this for details of the syntax

> >HOWTO: Add a FoxPro Database to SQL Server as a Linked
> Server
> >PSS ID Number: Q199131

> >Article Last Modified on 07-27-2001

> >--

> >Allan Mitchell (Microsoft SQL Server MVP)
> >MCSE,MCDBA
> >www.SQLDTS.com
> >I support PASS - the definitive, global community
> >for SQL Server professionals - http://www.sqlpass.org



> >> Hello,

> >> I have linked a server to a visual foxpro datasource.
> I'm
> >> having problems updating visual foxpro tables, I get
> this
> >> message "command contains unrecognized phras/keyword".
> >> This is my sql string
> >> update nis_data.[\\oracleserver\nis\nis]..salon
> >> SET              priority = 'B'
> >> WHERE     (priority LIKE '%A%')

> >> what am I doing wrong?

> >.
> >Hi Allan,

> I read the article and I have already done everything in
> the article.  When I use     update Openquery
> (nis_data, 'select * from salon')set priority="B" where
> priority="A", it works.  But I tried to use this same
> statement in a ddq for my update statement like
> this...update Openquery(nis_data, 'select * from salon')
> set priority="B" where salonid =?  it does not work.  Can
> you not use parameters with this?

> Thanks a lot Allan, I've noticed that your support
> contributes  a great deal to this site!