Combo box connect in a differetn table in visual fox-pro - visual-foxpro

"I am trying to build a manual entry using a visual fox-pro. my combo box has a different categories and i want to connect it in a different table. is this possible?"

Yes it is, of course, possible. Combobox have support for different type of data sources and one of them is SQL. You can write your SQL sentence as the RowSource and set RowSourceType to 3-SQL.

Related

How to navigate XAMPP/myPHP and verify if mySQL is functional?

Recently downloaded XAMPP on Windows and I would like to request a tutorial on how to navigate the program. I'm not sure how to open myPHP and test SQL Queries or create databases. Any help would be appreciated.
Welcome to XAMPP,
By now you should have the program installed in the location of your choice from the Apache friends website. I understand that it is quite difficult to get started on a new project utilizing unfamiliar tools, by the end of this short tutorial you can start building all sorts of ideas!
1. To start, open the application from the desktop. On windows, the opening screen will display as shown below. Click on "Start" for the Apache and MySQL modules.
Homepage of XAMPP
The port value will be 80 for Apache in most cases, this varies dependent on module type and other applications with respect to their assigned port numbers.
These can be viewed by navigating to "Netstat" which displays socket properties. Configurations can be completed under "Config" in the top right of the application and under "Service and Port Settings". Common issues to modules not working correctly is due to port error or overlapping and changing values will prevent this.
2. The status of the modules is portrayed in the panel below. In your preferred internet browser, type "http://localhost". The dashboard of Apache with given instructions will show when entered. Navigate to "PHPMyAdmin" at the top right of the webpage.
PHPMyAdmin
The critical step for this dashboard to be functional is to have the MySQL module running. On the left of the screen, databases are displayed when created.
3. Next, type "Create database test;" in the SQL tab queries text box. The console is displayed at the bottom of the page representing errors and program messages. Click the "Go" button. The "test" database will join the list of databases on the left side of the window.
This verifies that MySQL and Apache servers are functional on the local computer. URL's define locations for pages that are requested and identify webserver addresses. Apache is an application that provides access to these requested locations to the user.
4. A simple webpage can be generated by the user through XAMPP. Create a .txt file with its contents only including "<h1>StackOverFlow</h1>" and under this type "<p>I am learning, this is a test</p>". Save this file in the htdocs folder inside the xampp installation location as "StackOverFlow.html". Go to your browser and insert "http://localhost/StackOverFlow.html".
The process listed allows the browser URL to request the existing web server to obtain the page's contents "http://localhost/StackOverFlow.html"
5. Next, go back to step 3 where queries will be used to construct tables for relationships of entities and test values.
The test database was created previously and still exists. Keep the query tab open and edit the initial script to be "create database if not exists test;". Add the statement "drop database if exists test;". These steps permit the program to refresh the database and scripted queries each time the user clicks "Go" resulting in the removal of overlapping data.
Two tables will be created and their relationship can be expressed shortly. In the next step, a simple Company and Product association is used. Basic terms to know to write SQL queries:
SELECT -> extracts data from a database
UPDATE -> updates data in a database
DELETE -> deletes data from a database
INSERT INTO -> inserts new data into a database
CREATE DATABASE -> creates a new database
CREATE TABLE -> creates a new table
DROP TABLE -> deletes a table
VarChar -> Varying variable character of desired length
Char -> character of set length
Not Null -> term cannot be null
Date -> date term reference
Integer -> term must be an integer
Key -> uniquely identifies row(s) in a table
SQL Syntax
6. Insert "use test;" under the creation of the database query. Then structure the code in an organized fashion for easy reading for the user.
Add "create table Company(" and under insert "companyName varchar(40) not null primary key,", then "street varchar(40),". Also, "city varchar(40)," and "province char(2)," with "postalCode char(6));".
Add "create table Product(" and under insert "producedBy varchar(40) not null,", then "dateMade date not null,". Also, "productName varchar(40) not null);".
The Company and Product tables are now created with specific dimensions, ordering, and terms.
7. There are many types of relations within SQL that allow individuals to retrieve specific data, store, and construct relationships between many tables with set parameters through additional queries. This example is simple where producedBy references the companyName containing relevant data.
Position the following below both the table queries:
Test values for Company table
Test values for Product table
Select "Go" and this will create tables that can be viewed by clicking the database "test" on the left side.
Here, the statement INSERT INTO is used to input the data below into the table with the parameters created. Appropriate ordering of data from first to last must match with the corresponding table. Invalid inputs will result in the console returning an error. Selecting specific data from a larger database with numerous tables can be accessed by "SELECT * FROM TABLENAME", creating temporary relations and returning desired data. This concept can be further discussed in another tutorial. The interface is extremely useful and can be implemented within html websites to store, calculate, or retrieve data/user processes.
XAMPP is an exceptional tool to create and integrate into different areas of development, I would recommend taking a look at "https://www.w3schools.com/" to further learn SQL, HTML, and other skills to extend your range of capabilities.
Thank you for going through this tutorial! If you have any questions feel free to leave a comment.

Visual Studio reports (RDLC) - multiple tables in one report?

I'm working with Visual Studio Reports (rdlc files) for the first time, so I'm still quite new to it, and I don't know if this can actually be done.
I want to have a report that contains multiple tables of the same "type" (i.e.: with the same columns).
Now, obviously I can do this "by hand" by adding multiple tables to the designer. But here's the catch: I don't know beforehand how many tables I have to display!
So basically what I'd want is some sort of "repeater", a way to put "a list of tables" on the report, and then pass an array of data sources in code that would be used to populate them.
Can this be done at all? I don't see anything obvious in the designer that would allow me to achieve this... is it possible?
If not, could this maybe be done with a more advanced solution, like Crystal Reports?
If your tables have the same columns - use single table with the grouping by whatever criteria that defines "how many" tables you need to have. It would appear as if you have multiple tables on the resulting report. You can display report header for each group and if needed start each on new page.
Bottom line, don't think about it as multiple tables, it's the same table with the data driving how it is being displayed on the report.
Maybe helpful:
https://msdn.microsoft.com/en-us/library/ms251700(v=vs.90).aspx
http://www.codeproject.com/Tips/767067/RDLC-Report-Grouping-with-Page-Break-Table-Header

Display Distinct values in LightSwitch browse screen

i have one browse screen which is fetching value from one entity(Attached to SQL datasource),
the entity will look like the below snapshot.
So in the browse screen its coming with all row values (1,2,3 and 4) even though i removed the Role field from the screen. I want to display the distinct Emp ID, Name, Age. Please give me some suggestion.
The question tags Lightswitch 2013 and 2012 so it's not clear what the OP is using. Views handling in Lightswitch before VS2013 Update 2 can be a little more challenging (particularly around the definition of key fields) so the other possibility is to use a WCF-RIA service to reshape the data. Having a WCF-RIA service ready to go always comes in handy eventually, even if there are annoying limitations and quirks there as well.
The exact steps depend slightly on what version of VS you are using:
The canonical article by Eric Erhardt - http://blogs.msdn.com/b/lightswitch/archive/2011/04/08/how-do-i-display-a-chart-built-on-aggregated-data-eric-erhardt.aspx
An up to date version for VS2013 - http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2226/Creating-a-WCF-RIA-Service-for-Visual-Studio-2013.aspx
Happy to help further with specific queries if you decide to go down the WCF-RIA route.
Phil
If you don't have the option of driving your Browse screen from your employee table I'd suggest creating a SQL view similar to the following: -
CREATE VIEW [dbo].[EmployeeView]
AS
SELECT DISTINCT
EmpId,
Name,
Age,
Role
FROM
dbo.YourTable
You can then attach to the view in LightSwitch and base the Browse screen on the attached view.
However, please bear in mind that you will only be able to view and not update the information as this type of view uses the DISTINCT clause.
The following blog post provides some basic details of using views in LightSwitch: -
Attaching to SQL Views

Calculated Column Menu Option Disabled in Spotfire

I am a complete rookie to spotfire and am trying to create a calculated column but the menu option is disabled and can't figure out why. It feels like something thats really simple. Can anyone help me out? My data source is a connection to a Microsoft SQL Server database.
First, if there is no data loaded, the Insert Calculated Column option will not be active.
Second, if you're using an in-database connection (not an Information Link), then you cannot insert calculated columns. In fact, with in-db connections, there's a lot of things you can't do:
Insert Columns
Insert Rows
Insert Calculated Column
Insert Binned Column
Data Relationships
K-means Clustering
Line Similarity
Data Functions
Regression Modeling
Classification Modeling
Insert Predicted Columns
But ... if you have data loaded and you're not using an in-database connection, I suspect the License for inserting a calculated column is not enabled for you. I don't know if you are an Administrator or not, but here is what I would recommend that an Administrator do.
Open the Administration Manager (Tools > Administration Manager). On the Users tab, search for your username and select it. Then, to the right, click the Licenses tab.
I believe the license for inserting calculated columns is under TIBCO Spotfire Professional and then Insert New Column. Make sure that's checked. If it is, then I'm not sure what the problem is. If it's not checked (i.e., there's a red X), then you'll have to go to the Groups and Licenses tab and Edit the Licenses for either yourself or the Group you belong to.
Be sure to look in the Spotfire Deployment & Administration manual if you haven't already: docs.tibco.com
I think this will get you close. You might consider posting in the Tibcommunity as well. Good luck.

How to make drop-down menu within Oracle Application Express?

I would really appreciate if anybody could shed some light on this, as search engine results have been singularly unhelpful so far.
I am attempting to build a GUI for an oracle database through Application Express. There tend to be tricks of how to set up drop down menus through the Graphical User Interface of the product that one uses (for instance I would know how to do this in a product like Microsoft Access).
For instance I have this form
The foreign key for Business (FK_BUSINESS_ID) is just an integer - not terribly user friendly! If it could be a drop down list of business names (BUSINESS.NAME), it would be great. Hiding the business primary key (BUSINESS_ID) would make it look nicer, but isn't altogether relevant.
I have found the source controls for the element in question.
What sort of SQL (or even PL/SQL) could be used to both display this data from the other table, and return the selected foreign key selected by the user when the form is sent?
Solution
Open up the item, and change the type to Select List
For List of Values Definition, enter select BUSINESS.NAME, FK_BUSINESS_ID from [TABLE]
Explanation
Select list shows display values to the user and returns the corresponding ID. Your source can remain the same as before.

Resources