Re: Create remote view programmically? by Agnes
Agnes
Wed Feb 04 02:05:52 CST 2004
Dear Trey Walpole,
Thanks For your kind reply , I copied an modified your code, however,
there are still prompting.
Now, my code is listed as follow:=
CREATE CONNECTION t_data;
connstring ;
'Driver={Microsoft Visual Foxpro Driver};'+ ;
'SourceDB=u:\honesty\vfptrans\data\transport.dbc;' + ;
'SourceType = DBC;' + ;
'UID=;PWD=;'
From Agnes
"Trey Walpole" <treyNOpole@SPcomcastAM.net> ¦b¶l¥ó
news:eRplpCo6DHA.1368@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
> oic - in the connection, try it with these parameters instead;
> notes:
> removed quotes around dbc and added dbc extension
> included UID and PWD to prevent prompting for connection when
creating/using
> the view
>
> Create connection itts_connection ;
> connstring;
> 'Driver={Microsoft Visual FoxPro Driver};'+;
> 'SourceDB=u:\sample\data\tradelink.dbc ;'+;
> 'SourceType=DBC;' +;
> 'UID=;PWD=;'
>
> CREATE SQL VIEW itts_chl REMOTE CONNECTION itts_connection AS SELECT *
FROM
> CHL
>
> "Agnes" <agnes@dynamictech.com.hk> wrote in message
> news:eU4Idyi6DHA.2416@TK2MSFTNGP10.phx.gbl...
> > It seems my it is wrong syntax of 'connstring', cannot anyone can help
??
> > "Trey Walpole" <treypoleNO@SPAMcomcast.net> ¦b¶l¥ó
> > news:ORghcLh6DHA.488@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g...
> > > i believe all you are missing are tne SQL and REMOTE keywords
> > >
> > > CREATE SQL VIEW itts_chl REMOTE CONNECTION itts_connection AS SELECT *
> > FROM
> > > CHL
> > >
> > > "Agnes" <agnes@dynamictech.com.hk> wrote in message
> > > news:e8ohUvf6DHA.2392@TK2MSFTNGP11.phx.gbl...
> > > > I try the folllowing code to create the odbc connection and remote
> view.
> > > > However, those code didn't work . Canyone give me a hand ?
> > > >
> > > > OPEN DATABASE u:\sample\data\tradelink
> > > > SET DATABASE TO "tradelink"
> > > > IF INDBC("itts_connection","CONNECTION") = .F.
> > > >
> > > > Create connection itts_connection ;
> > > > connstring;
> > > > 'Driver={Microsoft Visual FoxPro Driver};'+;
> > > > 'DBQ="u:\sample\data\tradelink" ;'
> > > >
> > > > CREATE VIEW itts_chl CONNECTION itts_connection AS SELECT * FROM CHL
> > > >
> > > > --
> > > > Thanks For Your kind Attention.
> > > > From Agnes
> > > >
> > > >
> > >
> > >
> >
> >
>
>