I'm using Visual Studio 2005. I have a GridView connected to a FoxPro dbf.
A report listener is an object that provides new-style reporting behavior. Report listeners are based on a new base class in Visual FoxPro 9 called ReportListener. To tell Visual FoxPro 9 to use a specific listener for a report, instantiate the listener class and then specify the object's name in the OBJECT clause of the REPORT command. Saya membuat instalasinya dgn software Instalshield Express, tp yg saya bingung waktu mw mengisi (2) File library Visual Foxpro dan (3) File Table. Jd sebenernya bagaimana cara menghubungkan *.dll? Apakah *.dll itu diambil dr System Windows atau *.dll buatan seperti/mungkin syntax, atau external yg harus didownload/browse atau apa pun?
![Foxpro Foxpro](/uploads/1/2/5/5/125597763/470124796.jpg)
I created a VFPOLEDB data source using Server Explorer. If I plug in a literal value in the GridView Configure Data Source - & test the sql - I get data returned. I've been trying to set up the Data Source to accept a parameter value from a TextBox on the aspx page & I can't get any records returned. When I try & test the sql within the GridView Configure Data Source - with a parameter - I get no records returned. In the GridView Configure Data Source. This works: SELECT jobnum, piecenum FROM filmjob WHERE (jobnum ='AB123456CD') This does not work: SELECT jobnum, pieceord, piecenum FROM filmjob WHERE (jobnum =?) This does not work: SELECT jobnum, pieceord, piecenum FROM filmjob WHERE (jobnum =?) - I get an error message that says, 'There was an error executing the query.
Check the syntax of the command and if present the types and values of the parameters and ensure they are correct. Attempted to read or write protected memory. This is often an indication that other memory is corrupt.' Or I just get no records returned. I know it has something to do with the sql that VS 2005 is creating in order to receive the parameter but I don't know how to pass the parameter. I've used the gridview for SqlServer databases & Access databases. And haven't had a problem.
But this is FoxPro. I hope I've given all the necessary information.
I'd greatly appreciate any help. Thanks, Robin. Hi Cindy, Thanks so muc for taking the time to respond to my request for help. No - I am not saying that the exact same syntax applies in Access and SQL Server. Rather, I'm saying that the same method I use to connect a GridView to a data source - works for Access and for SQL Server - even though the sql generated by Visual Studio 2005 is different for Access & for SQL Server. When I use the GridView Choose Data Source dialog Box and the sql it generates to query either Access or SQL Server - I am able to pass a parameter and get rows returned.
The syntax VS 2005 generated when I accessed a SQL Server database looks like this: SELECT JOB, FRAME, ROLL, SEQ, SUBJECT FROM TABLENAME WHERE (JOB = @JOB) ORDER BY ROLL, SEQ The syntax VS 2005 generated when I accessed an Access database looks like this: SELECT Name, Format(Date, 'mm-dd-yy') AS WkDate, Shift, Hours, Units, Format(Units / Hours, '0.00') AS Average FROM tblProductivity WHERE (Department =?) AND (Date =?) AND (Date. Hi Robin, This works for me against the VFP TasTrade database which is pretty much like Northwind. For any others reading, the query designer wants to enclose everything in 's but s are string delimiters in VFP so if you 'SELECT Customer.' You'll get 'Customer' as the selected value.
<%@ Page Language='vb' AutoEventWireup='false' CodeBehind='Default.aspx.vb' Inherits='WebApplication1.Default'%
In particular, I made sure that my code in the 'Source' view a sp: SqlDataSource. / asp: SqlDataSource looked like what Cindy showed - except with my field names & my text box name. I still don't know why I could not get this to work when I was trying to generate the the select statement from the wizard.
It wouldn't surprise me if I started out doing something wrong. I'll try and simulate what I did to begin with to see if I can replicate the situation & then post the findings here. Thank you very much. YesHi again, I have now managed to have three GridView controls on the page display info based on the value in the one TextBox on the page. In the first two GridViews, the value in the TextBox corresponds with a field in the respective dbf files that the GridViews are bound to. What I wanted to do next was to use the Value in the TextBox in a multi-level sql statement to retrieve data from a dbf file that does not have a field corresponding to the Value in my TextBox. For Example: I was getting info in the first two GridViews based on EmpName.
But to get the Department Details for the Department the Employee is in, I had to get the Department Name for the Employee from a second table from which I could only get data if I provided the EmpID for the Employee - which I could only get from a third table using EmpName: SELECT. FROM tblDeptInfo WHERE Dept = (select Dept from tblEmpDept where EmpID = (Select EmpID from tblEmployee where (EmpName =?))) This has worked for me & I wanted to pass it on in case anyone else ever needs to know. Thanks again for the help! Thanks for this message from 18 months ago. I've beat my head on the ASP.NET web developer trying to make it behave with VFP. Now I've got this very simple page to work, passing a variable from a text box to the grid display. Getting the syntax right was the issue.
I see you really have to hand code some of this stuff. The Visual Web Developer Express product is not nearly as polished as VFP, even though it presents you with numerous wizards and automated steps. Visual FoxPro OleDB Provider FoxPro.