Can forms communicate to VFP (Visual Foxpro)
Hello All,
I am using forms 6i and dataabse 9i in windows 2003 server.
I have couple of application in forms and Visual Foxpro(VFP). The VFP program can commucate to the oracle database.
Here I am looking forms connect to VFP database (As per my knowledge it is not possible, if there is any way to connect) , or when I am inserting some data to the oracle database it should insert the record into VFP database.
For this I have created triggers in the oracle tables so that when DML oreration are happening in the database it can triggered and same time the VFP tables can be updated by the oracle triggers. But my problem is I am not able to connect to the VFP table from the Oracle.
Any body have any idea on it, Please suggest.
Thanks,
SUN
Here is the code i have cut down the code and giving u only necessary code (not tested may be some syntax errors or missing end ifs etc etc)
Before u start
- Install Open Client Adaptor from Oracle forms Installer
- Create ODBC DSN named 1C and in advance property set username scott and password tiger
Procedure get_data(vfrom_date date, vto_date date) IS
connection pls_integer;
cursor_rec pls_integer;
stmt_rec varchar2(4000);
BEGIN
stmt_rec := 'select [ref], [#date], [#sumd], [#sumc], [#docnum], [#cur], [#acc] from [#rec]
where [#date] >= datevalue('''||vfrom_date||''') and [#date] < datevalue('''||vto_date||''') order by [#acc], [#sumd], [#sumc]';
connection := oca.dbconnect('scott/tiger@odbc:1c_db');
cursor_rec := oca.execute(connection,stmt_rec);
go_block('datablk');
clear_block;
loop
begin
oca.fetch_row(connection,cursor_rec);
oca.coldata(connection,cursor_rec,1,:ref_no);
oca.coldata(connection,cursor_rec,2,vdate);
oca.coldata(connection,cursor_rec,3,:debit_amt);
oca.coldata(connection,cursor_rec,4,:credit_amt);
oca.coldata(connection,cursor_rec,5,:docnum);
oca.coldata(connection,cursor_rec,6,vcurstyp_code);
oca.coldata(connection,cursor_rec,7,:acc);
next_record;
exception when no_data_found then
-- message('NO MORE ROWS');
clear_record;
exit;
end;
end loop;
first_record;
oca.close(connection,cursor_recapp);
oca.disconnect(connection);
exception
when oca.connection_error then
set_application_property(cursor_style,'NORMAL');
message('OCA-Connection error');
when oca.cursor_error then
set_application_property(cursor_style,'NORMAL');
message('OCA-Cursor error');
when others then
set_application_property(cursor_style,'NORMAL');
message(sqlerrm||'Other Error');
end;
plz mark correct/helpful if it is
Baig,
[My Oracle Blog|http://baigsorcl.blogspot.com/]
Similar Messages
-
Can oracle PLSQL program communicate to VFP (Visual Foxpro) Database.
Hello All,
I am using dataabse 9i in windows 2003 - 32 bit server.
I have couple of application in forms and Visual Foxpro(VFP). The VFP program can commucate to the oracle database.
when I am inserting/updating/deleting some data to the oracle database it should insert/update/delete the record in VFP database.
For this I have created triggers in the oracle tables so that when DML oreration are happening in the database it can triggered and same time the VFP tables can be updated by the oracle triggers. But my problem is I am not able to connect to the VFP table from the Oracle.
Any body have any idea on it, Please suggest.
Thanks,
SUNOracle has a facility called Heterogeneous Services. It uses odbc or ole to communicate to third party databases.
You need a Foxpro ODBC driver, and you need to set up several Net related files.
Please refer to http://download.oracle.com/docs/cd/B10501_01/server.920/a96544/gencon.htm#1656
Sybrand Bakker
Senior Oracle DBA -
How can form communicate through RS232 (serial) link?
How can form communicate through RS232 (serial) link?
What I have to use/install/setup/copy?
ThanksYou can also create a dll library and use the procedures in this library with the Forms ORA_FFI package. See the Forms online help.
-
Visual Foxpro (VFP): Background color for ResizeCanvas - how?
I'm using Visual Foxpro to automate certain tasks with photoshop.
I can open an image file, save it as something else, extend the canvas, but I cannot set the color for the canvas that gets added.
Somewhere in the application model for Photoshop (CS) must be an object property to set the background color to some kind of value representing for example a certain grey.
Has anybody worked with this
General approach in my VFP-Code:
PUBLIC oPhotoshop
oPhotoshop = CREATEOBJECT( "Photoshop.Application" )
oJPEGSaveOptions = CREATEOBJECT("Photoshop.JPEGSaveOptions")
oJPEGSaveOptions.quality = 8
lnNewH = 800
docRef.resizeCanvas(lnNewH ,lnNewH ,5) && 5 = extend to all sides with active background color
docRef.SAVEAS(lcfilename2, oJPEGSaveOptions, .F.)This sounds like more of a scripting question than a SDK question, so in JavaScript I would do something like this:
// retrieve the current background color
var oldColor = new SolidColor();
oldColor = app.backgroundColor;
// create a new SolidColor object and assign a color value
var newColor = new SolidColor();
newColor.rgb.red = 100; //or whatever red value you want
newColor.rgb.green = 150; //ditto green
newColor.rgb.blue = 200; //ditto blue
// set the Application backgroundColor property to the new color
app.backgroundColor = newColor;
// do what you gotta do!
// set the Application's backgroundColor back to it's old value
app.backgroundColor = oldColor;
I'm not familiar with using Visual FoxPro as an IDE... If you're using VBA scripting, the syntax will be a little different - but the procedure should be the same. I hope this helps. -
Philadelphia VFP User Group--Tuesday, April 14--"Document Management within Visual FoxPro"
The Philadelphia VFP User Group meets Tuesday, April 14 at 7:00 PM in room 104, DeVry University, 1140 Virginia Drive, Fort Washington, PA. As usual, feel free to bring some dinner and come as early as 6:30 PM.
This month, member Jim Connolly will speak on “Document Management within Visual FoxPro.”
Abstract: I created programs that will create an electronic filing system. The programs read the bar codes from the invoices and files them in electronic storage. This allows the end user to view the documents with a single click in the app. I will show the
class how to setup the bar code reader and to accept individual scans for easy access. There are some recommended programs that will assist in the process. I will present them along with the Fox Pro program.
We need speakers for upcoming meetings. Please let Jim ([email protected]) know if you have something to share with the group.
http://vfpphilly.blogspot.com/The Philadelphia VFP User Group meets Tuesday, April 14 at 7:00 PM in room 104, DeVry University, 1140 Virginia Drive, Fort Washington, PA. As usual, feel free to bring some dinner and come as early as 6:30 PM.
This month, member Jim Connolly will speak on “Document Management within Visual FoxPro.”
Abstract: I created programs that will create an electronic filing system. The programs read the bar codes from the invoices and files them in electronic storage. This allows the end user to view the documents with a single click in the app. I will show the
class how to setup the bar code reader and to accept individual scans for easy access. There are some recommended programs that will assist in the process. I will present them along with the Fox Pro program.
We need speakers for upcoming meetings. Please let Jim ([email protected]) know if you have something to share with the group.
http://vfpphilly.blogspot.com/ -
How can a LabView process communicate with a Visual c++ process
How can a single Labview process communicate with another Visual c++ Process?
Both Application are running separately. The LabView Application must have the Possibility to send command to the C++ Application and receive Data from this process.
Thanks.Thank y for your answer.
The c++ application has already been written but don´t have an external interface.
The LabView application can have an activeX interface other dlls.
Do you have some LabView example code using activeX interface other another Method to communicate with a c++ application?
I have no practical experience with the interprocess communication.
Any example in LabView will help me.
Thanks -
Integrate Crystal Reports version 11.5 and Visual FoxPro
Post Author: landc50
CA Forum: General
I have developed several softwares in Visual FoxPro while using Crystal Reports Version 7 as the major reporting tool. It was easy to invoike Crystal reports from my applications, simply by adding the Crystal OCX onto the VFP form.
Now --- I have added the ActiveXReportViewer from version 11.5 onto my VFP form. Looks ok but it I am not sure how to invoke the reports in Maximized mode. Seems like it will only show the report the same size as the object I placed on my VFP form.
I need to know how to do this yesterday. I must implement a new system and I do not want to revert back to Crystal reports version 7. Any help would be appreciated.Post Author: The Donger
CA Forum: General
Hi,
I would recommend you have an empty form and drop the viewer on that form. Set the form's state to Maximize.
Good luck,
Brian -
How to use ole2 in forms 6i to run visual foxpre .exe file
hi
i m using forms 6i to run .exe file(visual foxpro 6).
i have used OLE container. but it is not working properly.(coz it is hardcoding the path set to initialize the container)
can OLE2 be used??? if yes, the can anybody tell me the code for that...
thank uI would suggest you start with the sample Java bean code we have
on otn.
http://otn.oracle.com/products/forms
go to the sample code section. -
I want to connect Visual foxpro database through forms6i.
Hi ,
I want to connect Visual foxpro database through forms6i.
actually i want to access Visual foxpro database in forms6i and retrive and update data from forms6i.
please help me urgently how can i do this in forms6i.
Thanks,
Md.Muniruzzaman Khan
Email : [email protected]do the following steps for hetrogenous service
Step 1
Create ODBC named Access1.
Step 2
Go to urs inithsodbc.ora file which reside at
ORACLE_HOME\hs\admin\inithsodbc.ora
and overrite by
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = Access1
HS_FDS_TRACE_LEVEL = off
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
Step 3
Add the following entry to the tnsnames.ora file:
ACCESS1.WORLD =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=ACCESS1))
(HS=OK)
Step 4
Add the following entry into the listener.ora file:
(SID_DESC=
(SID_NAME=ACCESS1)
(ORACLE_HOME=D:\Oracle)
---Define urs oracle home path in mine case it is at D:\Oracle--
(PROGRAM=hsodbc)
Step 5
Reload the listener from contol panel services yours listener service
Step 6
Create a database link using:
CREATE DATABASE LINK access1.world CONNECT TO "MyUser" IDENTIFIED BY "MyPassword" USING 'ACCESS1.WORLD';
Step 7
Connect to scott/tiger
Query the table using:
SELECT *
FROM [email protected];
Step 8
Same you can connect to urs forms and write above sql in cursor
Acknowledge me.
Khurram Siddiqui -
Provider not listed in Linked Servers Providers (Visual FoxPro Ole db)
I'm trying to set up a linked server to a VFP database. I have downloaded, and installed "Microsoft OLE DB Provider for Visual FoxPro 9.0" I did read the Installation instructions about previous versions - there were none.
After installing, I launched SSMS and tried to create a Linked Server, but the VFP Provider is not listed.
I made sure the vfpoledb.dll was registered by running 'regsvr32.exe fpoledb.dll'. Launched SSMS - Provider still not listed.
I have uninstalled and re-installed the OLE DB Provider. Logged in as Administrator. SQL Server 2012
What do I need to do to get VFP to show up in the Providers list?
Thanks,
MikeHi mbailey218,
Since you didn't mention your SQL Server 2012 is 32-bit or 64-bit, I assumed it as a 64-bit version.
Did you download the Microsoft OLE DB Provider for Visual FoxPro 9.0 from
here? It is a 32-bit oledb provider which means it can work with 32-bit SQL Server only.
As far as I know there's no 64-bit version OLE DB Provider for Visual FoxPro, so you may take either workaround below.
Working with 32 bit providers and 64 bit SQL Server
use a 32-bit version SQL Server 2012(the last option you may choose)
If it is 32-bit SQL Server you installed, please confirm and provide your SQL Server version details and the version of the OS where your database is hosted so that we will look into the specific scenario.
Eric Zhang
TechNet Community Support -
I'm a total Macbook newbie and a VFP developer. The reason for purchasing the Macbook is to determine whether our Visual Foxpro application will run in Parallels on a Mac. Obviously, this is a marketing opportunity for us that we want to take advantage of if everything works properly.
I've got Parallels installed on my Macbook but I haven't had a chance to install VFP yet. Just thought I'd check to see if anyone else has tried this.This may not be an immediate answer to your question, but you might want to post as well on the Parallels Desktop for Mac support forum. I did do a quick search for "foxpro" on the forum and only hit a couple of posts, so at the moment there isn't a lot there but it still might be worth a shot posting. The folks who hang out on that form (I do there and here) are generally pretty helpful (OK, I hope I'm helpful .
-- Bob
Intel Mini 1.66 GHz, Mac Pro 2.66 GHz Mac OS X (10.4.8)
Vista and XP running under Parallels -
Windows 8.1 - Office 2013 - Visual FoxPro - excel data connection problems
Hi i have an excel document with existing data links to a foxpro database. these links worked on windows 8 with office 2013 but since getting windows 8.1 the links no longer work.
After much searching i have found i need to installed VFPOLEDBSetup.msi
This does not fix the issue. The ODBC Data sources located Control Panel\All Control Panel Items\Administrative Tools still have no reference to FoxPro and within excel if i select from other sources and the other/advanced i can see the Microsoft OLE DB
provider for visual fox pro but it crashes excel.
in Windows 8 ODBC Data sources located Control Panel\All Control Panel Items\Administrative Tools i have listed two items Visual FoxPro Database and Visual FoxPro Tables but both these are missing in Windows 8.1.
What do i need to do to correct other than not to use Windows 8.1
Many ThanksHello,
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue.
Thanks,
George Zhao
Forum Support
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "[email protected]" -
http://rorymon.com/blog/index.php/app-v-recipe-visual-foxpro-9-0-sp2/
I am no longer posting recipes in plain text on this forum. I will instead post links to my site which contains step by step instructions with images.
PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
rorymon.com Twitter: @RorymonThis is not obvious. VMware should allow some monitoring which will show the bottle neck. Did you check what VFP command causes these delays? File opening, record/file locking etc?
-
Hi all,
I am able to INSERT and SELECT records from FoxPRo database successfully.
The driver is Sun JDBC-ODBC bridge
The DELETE statement throws no exception.
I've tried to execute PACK after the DELETE call and got following exception:
java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File must be opened exclusively.So I tried USE MYTABLE EXCLUSIVE in a Statement before calling PACK and got the exception:
java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violationI've also tried inserting the USE MYTABLE EXCLUSIVE before calling DELETE but got the same exception above.
The ODBC DSN for MYTABLE is setup as:
- Free Tables (not database)
- Null (checked)
- Deleted (checked)
- Fetch data in background (checked)
I am not able to issue any of the following commands to FoxPro using java
OPEN - To open a table
CLOSE - To close a table
USE - To open a table for uer either in exclusive mode or shared mode
The exception being generated is :
java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violationThe help file of the Microsoft Visual Foxpro Driver states that the driver has support for the above commands.I a not able to get the way to issue the above commands to the driver using java.
In setting up the ODBC DSN I saw no "read only" setting.
In the Visual Foxpro table, I saw no READ ONLY settings.And also, there are no delete permission grants and there is no user database sesssion concept.
I've tried all of the above with DSN mapped to a database(NOT free tables) and setting AUTO-COMMIT OFF and AUTO-COMMIT ON.But in vain. The same exceptions as those stated above persisted.
Environment:
Microsoft Windows XP Professional
JDK version "1.4.2_09"
Microsoft Visual Foxpro 06.00.8167
Microsoft Visual Foxpro Driver 6.01.8629.01
Don't know what else to try.
Can anybody please help me.
Thanks in advance
Archanajava.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File must be opened exclusively.
In the Visual Foxpro table, I saw no READ ONLY settings.And also, there are
no delete permission grants and there is no user database sesssion concept.
The ODBC DSN for MYTABLE is setup as:
- Free Tables (not database)
- Null (checked)
- Deleted (checked)If you're using Visual Foxpro database(.DBC), you should see "Exclusive" option too. You can try check it, but I don't know whether your issue will disappear. -
Alternative for Visual FoxPro on OS X?
Does anyone knows any alternative for Visual FoxPro on OS X which can run simple commands, because I do not have any server and I do not need to work on whole programs?
Check out Lianja http://www.lianja.com
It supports Visual Foxpro syntax and runs on OSX as well as Windows and Linux.
It also has a interactive console allowing you to simply enter Visual Foxpro commands without requiring you to write a program.
Maybe you are looking for
-
It won't allow me to search. As soon as I type a single key in the search field. It freezes, then crashes. WHY??????
-
How do I fix this Version Cue error
I recently upgraded my Vista Machine to Windows 7. Before the upgrade I deactivated and uninstalled my Adobe Creative Suite software. After the Windows 7 upgrade I reinstalled both CS2 Premium and CS4 Design Premium. It said there was a error duri
-
Can I use Netflix on my Apple TV gen 1?
-
Problem with UE ZXKKEU11 in ECC 6.0
Hi Guys, I have a problem with UE ZXKKEU11. When it was called from VA01 during material insert, the structure i_copa_item is empty and I don't know why. Have you got any suggestion??? Thank you in advance for any useful answer If you could I need he
-
ASP login success by authorization
I am trying to create a login page in ASP where, on login success, the the user is directed to one of three separate pages. The SQL Table is LogIn The user name column is "email" The Password column is "password" The Access column is "permission" (If