General discussion

Locked

run other program on VB6's prog

By poois ·
Can u tell me on how to working with other program when the vb6 program is running? example: i am using vfp as database... and a vb6's program... when i want to access to vfp like ask vfp to remove all the deleted record through vb6's program, i need to have vfp command in my program, right??

Can someone tell me how to do with this? Thank you....

Eve

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

run other program on VB6's prog

by Glen_McLeod In reply to run other program on VB6' ...

Just like you'd manipulate any other database from VB. You can send SQL commands to the data engine to be executed, or use the metnods of your data access layer. Either way you have to first connect to the database using ADO, RDO, or something similar.

Using ADO to send an SQL command:

myADOConnectionObject.Execute "Delete * from Employees Where EmpID = 415"

Using ADO object methods:

myADORecordsetObject.Delete

Glen

Collapse -

run other program on VB6's prog

by poois In reply to run other program on VB6' ...

Thank you..... but this is not what i want to ask...... the question is how do i running the vfp's function like "PACK" after i remove the selected data..... and somemore like "set date dmy" :)

Collapse -

run other program on VB6's prog

by Glen_McLeod In reply to run other program on VB6' ...

That's what the first syntax is for. By using the .Execute method, you can pass (just about) any valid executable DML or DDL command to your data engine.

Glen

Collapse -

run other program on VB6's prog

by poois In reply to run other program on VB6' ...

Glen,
Can u give me a very simple example on how to execute to the DML or DLL command?? like what code do i need to type on VB6 to set the date format of vfp to DMY..... as i know .execute is only can use to access to database only... i am a bit confuse with this.... TQ

Collapse -

run other program on VB6's prog

by andrew In reply to run other program on VB6' ...

If you can't do what you want through DDL or DML, you'll have to use VB to access the VFP automation interface. Here's a small example:

Set oTest = CreateObject("foxole.person")
cName$ = oTest.GetName()

Use the VB references dialog & the Object Browser to find and examine these interfaces for the functionality you need.

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums