B. Chernick
1/9/2008 2:58:00 PM
I've just made some progress thanks to your suggestion, although I am still
not sure I fully understand.
In the xsd table I changed the Where clause of the parameterized query to
'WHERE (jobno = ?)'. I then went into the Parameters collection of the
Query properties and changed the parameter's name from @jobno to jobno.
(Apparently, unlike my SQL app, this one does not like @s.)
The selection in the DetailsView screen works.
(Now to figure out how to do updates.)
"JIGNESH" wrote:
> I have one question. Does foxpro recognizes paramters by its name or by its
> position? I mean
>
> Select * from ord where no = @No
> OR
> Select * from ord where no = ?
>
> Some database takes second approach.
>
> Regards
> JIGNESH
>
>
> "B. Chernick" wrote:
>
> > I'm trying to set up an ASP.Net 2.0 web app that reads some FoxPro 6 tables
> > that I've put in the APP_Data directory.
> >
> > I've put a gridview on the first page and bound it to a sqldatasource using
> > an oledb provider. The connection string is "Provider=VFPOLEDB.1;Data
> > Source='|DataDirectory|';Collating Sequence=MACHINE" This works fine.
> >
> > What I want to do next is select a record and pass its id to an editing
> > screen with a DetailsView. I've done dozens of these screens using
> > ObjectDataSources and SQL Server. OleDb seems to be different.
> >
> > I bind the detailsview to another SqlDataSource, same connection string.
> > The query string field is passed to the screen correctly. But if I setup a
> > filter in the SelectQuery in a manner as similar to my normal practice as I
> > can manage, it crashes the page: Command contains unrecognized
> > phrase/keyword.
> >
> > For this example, the select string is "SELECT * FROM [ord] where
> > [ord].jobno=@jobno" The parameter is defined as @jobno, a QueryString field.
> >
> > I've tried as many variations as I can think of with this but they all end
> > in crashes or blank screens. If I leave out the parameter entirely, the
> > DetailsView does display the record normally. (Actually it's the only one in
> > the table at the moment.)