Grid Column Sorting (another try)
Hi all,
I have a table "A" with a field booknumber that points to booknumber in
another table "Books", the relationship is one to many.
if I have the table "A" in a grid and point the ControlSource of the
booknumber to the bookname in "Books", how can I sort the grid by the
bookname and not the booknumber when I click on the column header.
this is the code I use in the Click event of the column header
oGrd = Thisform.pageframe1.page2.grdtableA
SET ORDER to booknumber ascending
GO top
oGrd.refresh
I want to be able to sort the grid using the bookname instead of booknumber
from the books table.
I know I can do that by using a view, but any other ideas?
Thanks
HME
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com Tag: DataGrid Freeze the column Tag: 222356
Copy To and memo fields?
Hi,
I'm running VFP 9.0, making an application which collects data from a SQL
2000 Server and synchronizes it with a Palm Pilot. I'm making the
application in the Palm with Satellite Forms and for the most part it's
working well.
However, I've just run into a road block and don't know how to solve it yet.
When I query the SQL data for one table one of the fields is a memo type
field. To sync. with the Palm I need to store the data in dbase format so I
use the Copy To... command with the type set as FOX2X. Of course the Copy
To... command doesn't copy the contents of a memo field so my application
doesn't work. Is there a work around for this? Anyone know how I can
create a dbase style table including a memo field?
Thanks in advance,
Linn Tag: DataGrid Freeze the column Tag: 222354
shared connection
What are the ramifications of using a shared connection in the creation of a
remote view, compared to an "unshared" connection?
FoxPro docs say this:
"The SHARE keyword specifies that Visual FoxPro use a new statement handle
for the shared connection, if available. If a shared connection is not
available, Visual FoxPro creates a shared connection when the view opens,
which you might be able to share with other views."
But that really doesn't give much useful information. Under what
circumstances would I want to share, or not share, a connection? Tag: DataGrid Freeze the column Tag: 222351
stored procedure called from wrong database
We are having an issue with a new application.
It is using 2 FoxPro databases, which both contain a stored procedure
called NewID(), and a table called ID_MASTER where the unique ID's are
located at.
We use the NewID() stored procedure as the default value for our
primary keys, called as NewID('TableName').
But at other times, we need to find out what the ID is before our
insert into the database, to link this ID in child tables for their
inserts.
Pretty straight forward so far.
The problem is that sometimes the newid() stored procedure seems to be
getting called from the wrong database, and it returns the wrong value.
This occurs in both instances above.
An example is:
INSERT INTO MARKIII!demand_order (bin_id, dmd_time_low, dmd_ready,
ord_id) ;
VALUES (laAvailableBins(iCount,1), lnEmptyTime, lbReady, .NULL.)
the primary key is dmd_id, and it has a default value of
NewID('demand_order'),yet sometimes it access the wrong database.
We have listed prior to this code SET DATABASE TO MARKIII, as well as
SET DATABASE TO (this.database_location)
this.database_location is the full path and database name to our
location.
Any help would be greatly appreciated. Tag: DataGrid Freeze the column Tag: 222337
User's Desktop - VFP9
Does anyone know of an FLL that is already out there that implements
the SHGetSpecialFolderLocation API function to get the user' desktop? I
don't know much about using the windows API from c++ so, if there were
one already made would be great.
I do know about using windows scripting to get the users desktop, but I
would like to use something a little more reliable. (windows scripting
may be turned off)
Any ideas, suggestions, leads to an fll..?
Thanks! Tag: DataGrid Freeze the column Tag: 222335
FoxPro Stack Overflow
Hi all. I have a single-threaded FoxPro 8 DLL being instantiated and
used in a IIS ASP application. At times, the DLL will stop responding
and produce a stack overflow. I am able to catch the problem with
WinDbg and it shows me the recurring frames but I do not understand how
to proceed in order to find where in the FoxPro CODE itself the error
is occurring. I need some assistance in translating the dump into areas
in the actual code that are causing the loop. The results of !analyze
-v are below. Thanks for any help!
0:025> !analyze -v
*******************************************************************************
*
*
* Exception Analysis
*
*
*
*******************************************************************************
*************************************************************************
***
***
***
***
*** Your debugger is not using the correct symbols
***
***
***
*** In order for this command to work properly, your symbol path
***
*** must point to .pdb files that have full type information.
***
***
***
*** Certain .pdb files (such as the public OS symbols) do not
***
*** contain the required information. Contact the group that
***
*** provided you with these symbols if you need this command to
***
*** work.
***
***
***
*** Type referenced: ntdll!_PEB
***
***
***
*************************************************************************
*** WARNING: Unable to verify checksum for pdm.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols
for pdm.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols
for oledb32.dll -
FAULTING_IP:
vfp8r!EXECloseDoHistory+5d
0c0615d5 a1f8d43a0c mov eax,[vfp8r!g_punt (0c3ad4f8)]
EXCEPTION_RECORD: ffffffff -- (.exr ffffffffffffffff)
ExceptionAddress: 0c0188cf (vfp8r!_chkstk+0x00000026)
ExceptionCode: c00000fd (Stack overflow)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 02172ecc
BUGCHECK_STR: c00000fd
DEFAULT_BUCKET_ID: APPLICATION_FAULT
PROCESS_NAME: DLLHOST.EXE
ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack
cannot be created.
RECURRING_STACK: From frames 0x4 to 0xc
LAST_CONTROL_TRANSFER: from 0c2d6f38 to 0c0188cf
STACK_TEXT:
021abee0 0c2d6f38 00000000 0000001e 00000000 vfp8r!_chkstk+0x26
021abef4 0c116276 20657355 525c3a58 4f534945 vfp8r!PCProgReset+0xc4
021adfa0 0c0c869f 00000001 00000000 898fdbe3 vfp8r!macro+0xff
021adfb4 0c0615d5 00000000 039d0270 021ae058 vfp8r!x_macro+0xc
021adfd4 0c061204 0c3ab4e0 0c061776 00000001
vfp8r!EXECloseDoHistory+0x5d
021adfdc 0c061776 00000001 00000000 0c3ad560 vfp8r!imode+0x96
021ae058 0c083b7a 00000000 00000000 00000000 vfp8r!xDoStmt+0x160
021ae318 0c0839ed 0000030c 039d17d5 0c018b3d vfp8r!arrayelement+0x3e1
021ae324 0c018b3d 0000020b 0c3ad560 0000002c vfp8r!esubscript+0x17
021ae398 0c06388b 00000008 021aea10 021aeb34 vfp8r!xxexpr+0xba
021ae3b0 0c0732e6 021ae3c8 00000008 00000004 vfp8r!xxgetname+0x33
021ae5e0 0c07543c 00000000 00000014 0c3b0aa0 vfp8r!DBMObj2SpecEx+0x11f
021aebec 0c0615d5 00000045 039d16f3 021aec90 vfp8r!x_use+0x1ba
021aec0c 0c061204 0c3ab4a0 0c061776 00000000
vfp8r!EXECloseDoHistory+0x5d
021aec14 0c061776 00000000 021aee0c 00000003 vfp8r!imode+0x96
021aec90 0c0a5811 00000045 00000045 00000040 vfp8r!xDoStmt+0x160
021aed10 0c0a57a9 021aee00 00000003 00000045 vfp8r!LDCIs25Form2+0xca
021aed34 0c069583 00000045 00000002 00000000
vfp8r!LDCInvokeUserMethod+0x8c
021aee58 0c0a5380 00000002 0394518c 00000003
vfp8r!omDoMethodOrEvent+0x6d1
021af030 0c2352e7 00000002 0394518c 00000003 vfp8r!omDoMethod+0x318
021af0b4 0c2362ca 021af0f0 00000045 000002ff
vfp8r!CFoxOleObjIGetOleObject::GetOleObject+0x1a6
021af1b4 0c2364f1 03841b9c 00000001 00000000
vfp8r!CFoxOleObjIDispatchInvoke+0x2ad
021af1e8 6b614279 03841b9c 00000002 6b65c888
vfp8r!CFoxOleObjIDispatch::Invoke+0x48
021af240 0c1cc64f 0cff32e0 021af214 0c0f177a
vbscript!DllUnregisterServer+0x43
021af24c 0c0f177a 021af9a8 6b6578ce 6b658e28
vfp8r!CstSrvComMapBlindFunc+0x46
021af264 6b61866f 052c0a78 03841b9c 00000002
vfp8r!ATL::AtlInternalQueryInterface+0x63
021af988 6b62e400 00000018 021afa7c 00000000
vbscript!GlobalBinder::EnsureBuiltin+0xf60
021afa38 6b62f166 021af9a8 00000000 56433230
vbscript!CScriptRuntime::SetVar+0x13a
021afab0 6b61a3d6 00000000 00000000 00000000
vbscript!CScriptRuntime::Run+0xc83
021afaf8 6b61a251 02563960 6b607b25 02579460
vbscript!GlobalBinder::EnsureBuiltin+0x5e00
00000000 00000000 00000000 00000000 00000000
vbscript!GlobalBinder::EnsureBuiltin+0x392e
FOLLOWUP_IP:
vfp8r!EXECloseDoHistory+5d
0c0615d5 a1f8d43a0c mov eax,[vfp8r!g_punt (0c3ad4f8)]
SYMBOL_STACK_INDEX: 4
FOLLOWUP_NAME: MachineOwner
SYMBOL_NAME: vfp8r!EXECloseDoHistory+5d
MODULE_NAME: vfp8r
IMAGE_NAME: vfp8r.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 3f73c232
STACK_COMMAND: .ecxr ; kb
FAILURE_BUCKET_ID: c00000fd_vfp8r!EXECloseDoHistory+5d
BUCKET_ID: c00000fd_vfp8r!EXECloseDoHistory+5d
Followup: MachineOwner
--------- Tag: DataGrid Freeze the column Tag: 222329
VC++ ADO VFPOLEDB: DB locally works; DB on NT server does not
I've written an application in VC++ in VS2005 that includes access to a VFP 9
database using ADO and the VFPOLEDB driver.
I'm using ADO (msado15.dll).
What is odd is that this application works fine when the VFP database is on
my own computer, but when it is on the network server, and I attempt to open
the RecordSet, I get an error saying "Feature is not available".
To test this outside of my own program, I used Excel, Import External Data,
and its Data Connection Wizard to create the connection to my database on the
server. When I click Test Connection, I get a message saying connection
succeeded. I then select Access permissions Read and Share Deny None. The
window that would allow me to select the table to use is empty.
If I repeat this using the VFP database on my own computer, the window lists
all of the tables in the database.
The database on my computer is a copy of the one on the network server.
I am logged into the network using an administrative account.
I can use VFP, and open the database on the server from my computer without
a problem.
I would appreciate your help.
Thanks, Tag: DataGrid Freeze the column Tag: 222327
Iniread section? (VFP7)
Hi.
I use the function below to read keys from ini files, and it works fine.
Sometimes I want to read an entire section into a string variable. How could
that be accomplished?
*****************************************************************
*!* Function IniRead
*****************************************************************
Lparameters cSection, cKey, nLen, cInifile
Local cRetval, cPath
cRetval = Space(nLen) + Chr(0)
Declare Integer GetPrivateProfileString In Win32API As GetPrivStr ;
STRING cSection, String cKey, String cDefault, String @cBuffer, ;
INTEGER nBufferSize, String cIniFile
If GetPrivStr(cSection, cKey, "", @cRetval, Len(cRetval),cInifile) == 0
Messagebox('Ini file error', 16, program())
Endif
Do While Not Empty(At(Chr(0),cRetval))
cRetval = Alltrim(cRetval)
cRetval = Left(cRetval,Len(cRetval)-1)
Enddo
Return(cRetval)
*****************************************************************
*!* End of function IniRead
***************************************************************** Tag: DataGrid Freeze the column Tag: 222326
PDFcreator Com Interface
Has anyone got an example of how to use the com interface of pdfcreator?
Still pretty new to windows programming and I haven't got a clue (even
after reading some of the sample scripts - where i could).
What I want to do is print a report to a pdf file then email using blat
(that bit I can do!)
thanks
Steve Tag: DataGrid Freeze the column Tag: 222322
HYPERLINK LABEL
Hi all
I looking For Something Like HyperlinkLabel Not To Used With URL But To Run
Procedure From My Form
Thanks Tag: DataGrid Freeze the column Tag: 222319
Not a character expression (Error 45)
Thanks for help.
I create a query in visual foxpro 9!The sql is:
select a.num,b.doctor;
from (select count(id) as num,cl group by cl) a;
(select count(id) as doctor,cl where dt="doctor" group by cl);
where a.cl=b.cl
It can get the correct data from the table,but it could not be readable by
the query designer.
Whenevery i quit/open the query view there is a messagebox say "Not a
character expression (Error 45)" and there is nothing in query designer.
I wander how to edit/run the sql without the warning.
Or without the designer tool edit the sql in the sql view directly!
Thanks anyway! Tag: DataGrid Freeze the column Tag: 222316
Illegal Immigration, the Non-Issue of the Week........................
Our politicians loved talking about it this week,
but they won't do anything about it. Get the details
from The Expert:
http://www.ExpertHumor.com/
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com *** Tag: DataGrid Freeze the column Tag: 222315
dataenvironment class code
Hello All,
I have the following code for an dataenvironment for a report.
The last line("this.cursor1.filter...) in the IF statement doesn't
work unless I have the variables as PUBLIC. The variables contain
valid dates. Could I do this any other way?
Thanks
Dave
DEFINE CLASS dteInspectionHoursReport as dteDataEnvironment
initialselectedalias = "vr0002"
ADD OBJECT cursor1 as cursor WITH ;
alias = "vr0002", ;
cursorsource = "vr0002", ;
database = "main.dbc"
PROCEDURE Init()
DODEFAULT()
LOCAL loDateRange as Object, ldStartDate as Date, ;
ldEndDate as Date
LOCAL ARRAY laDate[2]
laDate[1] = DATE() - 30
laDate[2] = DATE()
loDateRange = CREATEOBJECT("_daterange",@laDate)
loDateRange.Show(1)
IF TYPE("loDateRange") = "O" AND !ISNULL(loDateRange)
ldStartDate = loDateRange.dStartDate
ldEndDate = loDateRange.dEndDate
this.cursor1.filter =
"BETWEEN(dinspectionact,ldStartDate,ldEndDate)"
ENDIF
ENDPROC
ENDDEFINE Tag: DataGrid Freeze the column Tag: 222312
DropDown List Display
Ok maybe I am brain dead right now. I have a dropdown list. It contains 6
fields from a table. It must be a table and NOT an array because there are
too many elements (records x fields - about 14,000 records x 6 elements and
growing) for an array. The control is bound to column 6 (numeric). The
control displays the first 5 columns (text) when it is in dropdown mode. When
I select a row from the dropdown, it displays ONLY the data in column 6. I
want to display the data in the other 5 columns, not column 6
I have tried to play with the displayvalue but for the life of me, i cannot
figure it out.
Thanks in advance. Tag: DataGrid Freeze the column Tag: 222309
Suggestion for INPUTMASK
I would like to suggest an enhancement to 'INPUTMASK' and
'DYNAMICINPUTMASK' - to add an option to 'prevent any data entry'.
Reason - there are several ways to simulate 'dynamicReadonly' but this
option to INPUTMASK would facilitate this easily.
Mike Farnesi
San Diego Tag: DataGrid Freeze the column Tag: 222306
Detecting Mouse Clicks in Grid Column Headings
Hello,
Thanks in advance for the help.
How do you detect mouse events in column headings in a grid control?
Suppose you wanted to make clicking in a column heading perform a
select/deselect all toggle. How would you know that the column heading has
been clicked?
Thanks,
Jeff Tag: DataGrid Freeze the column Tag: 222303
last record per id view
I have an Oracle table with assets, periods and various other fields.
Can a create a view to show me the records for the last period per asset?
The 2 stage SQL all processed at the client end would be something like
SELECT asset, MAX(period) AS maxper ;
FROM table ;
GROUP BY asset ;
INTO CURSOR foo
SELECT table.* ;
FROM table, foo ;
WHERE table.asset=foo.asset ;
AND table.period=foo.maxper
but I don't want to drag a gazillion records into Fox to do that if I can
avoid it by making the server process it before sending.
--
TIA
Andrew Howell Tag: DataGrid Freeze the column Tag: 222298
spiradoc record delete
Strange happening here. I have an app that continually runs which uses a
table "config" that contains 100 paramters in a single record to control
it's operation. Every once in a while the program bombs and I find the
config table either with an extra blank record or the single record is
marked for deletion. There is no code to append or delete that file.
The only thing I can come up with is possibly a routine in my program that
selects another table and deletes/appends records is failing on the open and
because the config table is always open it reverts to that. Any other idea
how this could happen? And/or suggestions to prevent?
TYIA
- Ben Tag: DataGrid Freeze the column Tag: 222296
blatmailen doesnt work
hello,.
i trying to send email with blat and smtp
thats my configuration:
blat -install servername sendername -1 -5022
telnetconnection to the exchangeserver with port 5022 works
and here are the syntax
blat test.txt -to meineadresse@firma.de
Blat v2.5.0 w/GSS encryption (build : Sep 14 2005 22:46:29)
Sending test.txt to meineadresse@firma.de
Login name is testtd
Error: Not a socket.
Error: Not a socket.
sorry for the bad english ;-)
i hope you can help me Tag: DataGrid Freeze the column Tag: 222292
Strange table behavior
I am using VFP 7.0 and have table that I open, zap and then append new
datafrom a delimited text file. When I do it manually from the development
environment it works ok. When it runs in my program from the IDE or stand
alone it has the old data in the table. How can that be from a zapped table?
I've put browse windows between the lines and it is empty and them appends
old data. I don't know where it is getting it. That file name does not
exist anywhere else on my system. Please help!
USE rmsmove IN 3 EXCLUSIVE
SELECT rmsmove
browse && old data
ZAP
browse && empty table
APPEND FROM .\updates\rms.full.txt DELIMITED WITH CHARACTER |
browse && old data again???
*REINDEX
Cory Tag: DataGrid Freeze the column Tag: 222279
Inet control StillExecuting not being set to False
I have a control that is based on the Inet control it has a httppost method
which is below. During development everything works fine but after I build
an exe the StillExecting property is not being reset to .F. and the exe is
using 95% of my processor. The "After THIS.StillExecuting " test is not
being written out to the file.
I use this same control on other forms with no problem in development or in
an exe.
Anyone have any ideas as to what could be causing this.
I am using VFP 7 SP1 on XP Pro.
The httppost method:
STRTOFILE("HTTPControl.Execute"+CR_LF,"c:\temp\auth.txt",1)
THIS.Execute(tcURL, "POST", tcSource, lcHeaders)
STRTOFILE("After HTTPControl.Execute"+CR_LF,"c:\temp\auth.txt",1)
DO WHILE THIS.StillExecuting
* Wait for the end of the request
DOEVENTS
ENDDO
STRTOFILE("After THIS.StillExecuting"+CR_LF,"c:\temp\auth.txt",1) Tag: DataGrid Freeze the column Tag: 222277
Moving from VFP 6 to VFP 9
We currently support Visual AccountMate for a client of ours, which is
accounting software written in VFP. We do a lot of reading from and
writing to VAM data structures from outside VAM itself. The VAM version
our client has been using, LAN 5, was written in VFP 6 and that's what
we've used to talk to its data structures and for our own custom
development work for this client as well.
We are planning to install a newer version of VAM, also LAN (VAM also
has a SQL Server-based product but we are not doing that upgrade now
although we will in the future, I'm sure) that was written in VFP 9, and
would like to know if we should expect changes in data structure
significant enough to cause our VFP 6 programs to be unable to read from
and write to VFP 9 tables. Obviously we are planning to upgrade our own
VFP to 9 but we're trying to figure out if we can get away with doing
the VAM upgrade before doing the VFP upgrade for ourselves and for our
client.
Thanks in advance - detailed replies, e.g, "this will work, but that
won't" are most welcomed.
-S- Tag: DataGrid Freeze the column Tag: 222268
VFP 9: Report label orientation and preprocessed totals
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C65308.53710F40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Some of the features touted for VFP9 report writer were preprocessed =
totals and the ability to rotate labels.
I've checked documentation and found no references to these two =
features. Were they ever implemented?
Thanks for the response.
John.
------=_NextPart_000_000A_01C65308.53710F40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DArial><FONT size=3D2>
<BODY>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>Some of the features touted for VFP9 report writer were =
preprocessed totals=20
and the ability to rotate labels.</DIV>
<DIV>I've checked documentation and found no references to these two=20
features. Were they ever implemented?</DIV>
<DIV> </DIV>
<DIV>Thanks for the response.</DIV>
<DIV>John.</DIV></BODY></HTML></FONT></FONT>
------=_NextPart_000_000A_01C65308.53710F40-- Tag: DataGrid Freeze the column Tag: 222265
OT: Help Desk software recomendation
Have received much help here for my VFP app but now I need help keeping the
support end organized. Can anyone recommend a good help-desk ticketing
software program? Don't want to re-invent the wheel here. Looking for
something web-based, Google search returned too many results. I'd like to
know if anyone here can make a recommendation.
TYIA
- Ben Tag: DataGrid Freeze the column Tag: 222263
decompiling VFP 5.0
I understand there's a program called Refox that will do this, i'm
wondering if there is anyone out there who'd be willing to do this for
less than the $400 cost of their program? I've lost everything
(computers and backups) in a fire, but can get customer .exe files. If
anyone can help please let me know,thanks.
--
jamesrav
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: DataGrid Freeze the column Tag: 222260
Network slows down SELECT-SQL
I am having a DBF named MJOB.dbf with 20000 records. The table has
indexes on the following fields:-
JOBNO
JOBDATE
JOBSERIES
I have also indexed on Deleted() as set deleted in on. However, the
following select-sql takes around 6-8 seconds when executed from a
workstation.
***Code***
Select max(JOBNO) from MJOB ;
where SERIES='A' and Between(JOBDATE,mFDate,mTdate) ;
into array mARray
Return mArray
I tried out several things and later the following proved to be more
quicker. (It takes less than 1 sec)
**Code**
Select JOBNO from MJOB ;
where MJOB.SERIES='A' and Between(MJOB.JOBDATE,mFDate,mTdate) ;
order by 1 ;
into cursor c1
Select C1
Go Bottom
Return C1.Code
Is MAX() function not optimized by RUSHMORE or is there any other
mistake in my 1st code.
Kindly guide.
Rajeev Tag: DataGrid Freeze the column Tag: 222258
OLEDragdrop question
hi,
I've got an application which uses the MS listview activex control. I want
to be able to drag an item from that listview control and drop it onto the
windows desktop and have it create a textfile with the name of the listview
item I just dragged.
Does anybody have any code that demonstrates how to do this?
Thanks
Tristan Tag: DataGrid Freeze the column Tag: 222253
SQL group by error
the following command works fine in VFP 6, but won't work with VFP 9. I get
a "1807: SQL: group by clause is missing or invalid". What is wrong with
it?! (something silly I've missed I bet)
select Creditor.CreditorCd, Creditor.AddrRecID, ;
GetDisc(Creditor.PromptTerm) as Discount, ;
CredTran.CrTranID, TranDate, PayBy, Reference, CredTran.Amount, ;
CredTran.Outstandng, TotAuthAmt, PromptTerm, CredTran.Paid,
CredTran.TaxAmount, ;
00000.00 as DisAmount, 000000000.00 as AmtToPay, ;
00000000.00 as Pay, "Chq" as cPayType, ;
count(1) as LineCount ;
from CredTran inner join Creditor ;
on CredTran.AddrRecID = Creditor.AddrRecID ;
inner join TranLine ;
on TranLine.CrTranID = CredTran.CrTranID ;
where PayBy <= pdPayToDate .and. CredTran.Outstandng > 0 ;
and TotAuthAmt > 0 and TotAuthAmt <> CredTran.Paid ;
and OK2Alloc({}, CredTran.Outstandng, .T., CredTran.TranType,
CredTran.Status, .T.) ;
group by CredTran.CrTranID ;
order by PayBy ;
into table (lcFileName)
Grant Tag: DataGrid Freeze the column Tag: 222251
Grid column sorting
Hi all,
I have a table "A" with a field booknumber that points to booknumber in
another table "Books", the relationship is one to many.
if I have the table "A" in a grid and point the ControlSource of the
booknumber to the bookname in "Books", how can I sort the grid by the
bookname and not the booknumber when I click on the column header.
this is the code I use in the Click event of the column header
oGrd = Thisform.pageframe1.page2.grdtableA
oGrd.SetAll("Picture","","Header")
SET ORDER to booknumber ascending
GO top
oGrd.refresh
I want to be able to sort the grid using the bookname from the books table.
I know I can do that by using a view, but any other ideas?
Thanks
HME
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com Tag: DataGrid Freeze the column Tag: 222250
In order to calculate the check number
Hello there!
I would like to ask for you help.
In order to calculate the check number, I have to determine the division of
a 21 digits number by 97 and for that I use the MOD () command.
The problem is that Fox only uses 15 digits for numeric values, and I would
need to get the result more then only 15 digits.
The command is mod(2500003842908003100,97)
Do you know how I can solve this problem?
Thanks in advance,
Pedro
PS - sorry for the bad English Tag: DataGrid Freeze the column Tag: 222245
Changing a report after the exe is made
Is there a way to make changes to a report in the manner below after
the executable is made? I'd like to parse the report according to the
user's selections. Thanks
***********code - not mine
LOCAL ARRAY laForms[1], laLinesToWipe[1], laSettings[1]
LOCAL lnCurForm, lnFormCount, llNeedsCompiling, lcOldDir,
lnNamesOnLine, ;
lcOldFont, lnNumSettings, lcTargSetting, lnLoop, lcNewExpr
*----------------------------- Program Code Begin
-------------------------
-
#define MAX_LINE_NAMES 4
#define NAME_WIDTH 28
lcOldDir = ALLTRIM(SET("DEFAULT")+ALLTRIM(CURDIR()))
IF !EMPTY(tcWhere) AND TYPE("tcWhere") = 'C'
set default to (tcWhere)
ENDIF
CLEAR
CLOSE TABLES ALL
IF MessageBox("About to clear printer info from all reports
in"+CHR(13)+CHR(13)+ ;
ALLTRIM(CURDIR())+CHR(13)+CHR(13)+ ;
"Go for it?",36,"Mass Report Update!") != 6
WAIT "Aborted." WINDOW TIMEOUT 1
set default to (lcOldDir)
RETURN .F.
ENDIF
lcOldFont = _SCREEN.FontName
_SCREEN.FontName = "Courier New"
lnNamesOnLine = 0
*
* Identify lines in FRX expr field to wipe out:
*
DIMENSION laLinesToWipe[3]
laLinesToWipe[1] = "DRIVER="
laLinesToWipe[2] = "DEVICE="
laLinesToWipe[3] = "OUTPUT="
*
* For each FRX file in the current directory:
*
lnFormCount = ADIR(laForms,"*.FRX")
ASORT(laForms,1)
FOR lnCurForm = 1 TO lnFormCount
llNeedToCompile = .F.
*
* Open the form as a table:
*
USE (laForms[lnCurForm,1]) IN 77
SELECT 77
*
* The first record has the printer info:
*
LOCATE
IF !EMPTY(tag) OR !EMPTY(tag2)
llNeedToCompile = .T.
ENDIF
*
* Clear the tag fields:
*
REPLACE tag WITH "", ;
tag2 WITH ""
*
* Remove the printer info from the expr field:
*
lnNumSettings = ALINES(laSettings,expr,.T.)
lnLoop = 1
DO WHILE lnLoop <= lnNumSettings
lnInc = 1
FOR EACH lcTargSetting IN laLinesToWipe
IF lcTargSetting $ laSettings[lnLoop]
llNeedToComile = .T.
ADEL(laSettings,lnLoop)
lnNumSettings = lnNumSettings -
1
lnInc = 0
ENDIF
ENDFOR
lnLoop = lnLoop + lnInc
ENDDO
lcNewExpr = ""
FOR lnLoop = 1 TO lnNumSettings
lcNewExpr =
lcNewExpr+ALLTRIM(laSettings[lnLoop])+CHR(13)+CHR(10)
ENDFOR
REPLACE expr WITH lcNewExpr
*MessageBox("Before: "+chr(13)+expr+chr(13)+chr(13)+"After:
"+chr(13)+lcNewExpr)
IF lnNamesOnLine < MAX_LINE_NAMES
??
PADR(ALLTRIM(laForms[lnCurForm,1])+IIF(llNeedToCompile,'*',''),NAME_WIDTH)
ELSE
?
PADR(ALLTRIM(laForms[lnCurForm,1])+IIF(llNeedToCompile,'*',''),NAME_WIDTH)
lnNamesOnLine = 0
ENDIF
lnNamesOnLine = lnNamesOnLine + 1
SELECT 77
USE
*
* Compile the FRX:
*
IF llNeedToCompile
COMPILE REPORT (laForms[lnCurForm,1])
ENDIF
ENDFOR
set default to (lcOldDir)
Marcel Jalbert seemed to utter in
news:22Wi7.289588$v5.29128506@news1.rdc1.ct.home.com:
- Hide quoted text -
- Show quoted text -
> I been working around a problem for years where a FoxPro report form
> fails to print to the selected printer or to the Windows default
> printer. Anyway to make a long story short, when I compose a report
> form for a printer that exists on the Desktop or Server the application
> always prints to that printer. I'm use VFP 6.0 sp4 and have seen this
> problem on Windows 95 and NT desktops and VFP 5.0. By compose I mean;
> Modify the Report, go to "Page Setup" select a printer, click OK and
> save the report form. There appears to be some hard coding in the
> report form that identifies the printer name the report form was
> designed for. If this printer name exists this hard coding seems to
> override the destination printer settings your application would
> normally print to. There are a couple of ways I get around this
> problem.
> 1) Temporarily change the name of the printer you want to compose the
> report form for, select the printer while editing the report from and
> save it. Recompile your code and rename the printer back to it usually
> name. You can't rename a printer with Windows NT.
> 2) Variations on the same theme that works with Windows NT would be to
> temporarily install a printer on the PC that the application will never
> printer to. Compose the report form for that printer, save it,
> recompile and delete the installed printer.
> 3) Have multiple copies of your report forms. Each composed for the
> printers you want the reports to go to. (Not a desirable solution)
> Has anyone else seen this problem? Is it on a FoxPro bug list? Am I
> doing somethink I shouldn't or is there a better work around?
> Thanks!
> Marcel
-- Tag: DataGrid Freeze the column Tag: 222241
Non-Modal windows problem - VFP 9
I am trying to instantiate several Non-Modal copies of a form in VFP
from the currently running form. I have set all of the properties
correctly as far as I know but, the forms end up being modal. I can
move the top one around and click on objects but cannot access the one
created before it without closing the last one it.
I have queried the windowtype in the modeless window and it is set to
0.
Any thoughts on what I am doing wrong here???
Jim Tag: DataGrid Freeze the column Tag: 222240
Duplicate records
I have imported a textfile to a table.
In this file there is now records which has the same information.
How is it possible to remove the duplicate records?
I have tried with different index ,delete, remove,alter, update and queries
but the duplicates is still there.
Many thanks in advance
Reidar Tag: DataGrid Freeze the column Tag: 222233
RAID 1 OR RAID 5 - YOUR OPINION
Our core processing software is written in Visual FoxPro. We have
experienced some performance issues with this software - slow inquiry
and slow processing speeds. We have received conflicting information
from a couple of different sources regarding the type of RAID used on
our server. I am asking for opinions, knowledge, etc. on whether RAID
1 OR RAID 5 works better when running a VF program. Any info would be
greatly appreciated. Tag: DataGrid Freeze the column Tag: 222232
Combo/Incremental Search/Space
I have a combobox with style set to Dropdown List and Incremental Search =
.t.
Incremental searching works fine until I hit the space bar as part of mt
search expression. For example, I want to search for "fred smith". I start
typing the characters and the incremental search works fine until I get to
the space character. Hitting the space drops down the list.
How can I force the space character to be part of the searched-for
expression and prevent it from driopping down the list?
Brian Tag: DataGrid Freeze the column Tag: 222228
Copy to Xls Command
This is a multi-part message in MIME format.
------=_NextPart_000_0039_01C651DC.7517B220
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
From Vfp 9.0 issuing the command
copy to excelfile type xls
creates an excel file. All fields convert correctly except date column =
which becomes "text" type in excel. How can I create an excel file with =
the correct date format.
------=_NextPart_000_0039_01C651DC.7517B220
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DTahoma size=3D2>From Vfp 9.0 issuing the =
command</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DTahoma size=3D2><STRONG>copy to excelfile type=20
xls</STRONG></FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DTahoma size=3D2>creates an excel file. All fields =
convert=20
correctly except date column which becomes "text" type in excel. How can =
I=20
create an excel file with the correct date format.</FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0039_01C651DC.7517B220-- Tag: DataGrid Freeze the column Tag: 222222
So Weird function execution problem - Trying to get the owner of a file. Functions included.
Hi,
I have written a program that scans a directory - local or network - and for
each file gets the owner name and the domain name and updates a table list.
I have noticed that something weird happens during the function execution
(function included).
The function sometimes does not return the owner and domain.
Therefore I set up a mechanism of a couple of retries and maintain a counter
of retries.
Now the weird things.
1. Sometimes for example for the folder c:\, I may have 200 retries, some
other times more than 1000 and some other times 50.
2. Furthermore, because I don't keep trying for ever, some files do not
return their owner. When I interactively later request the owner I am able
to get it, so there isn't a file specific prolem.
3. The most weird. During the program tests, I had noticed that each time,
different files appear in the table list without their owner/domain.
What exactly is going on?
Is there a timeout problem?
Demetrios, Greece
--------------------------------
* GetFileOwner - Get the owner of an NTFS file
*
* VBCode in: http://www.devx.com/vb2themax/Tip/19292
* Runs over Windows NT or 2000, and works only with files in NTFS partitions
*
* Requires the GetFileOwner_APIs.prg
*
* Usage:
* ------
* GetFileOwner_APIs()
* Store "" to Domain, Owner
* GetFileOwner(fileName, @Domain, @Owner)
*
* Example:
* --------
* GetFileOwner("C:\Windows\hh.exe", @Domain, @Owner)
* ? Domain, Owner
LParameters szfilename, Domain, Owner
#Define OWNER_SECURITY_INFORMATION 1
Local m.sizeSD, m.pOwner, m.ownerName, m.domain_name, m.name_len
Local m.domain_len, m.nLength, m.deUse, m.sdBuf
m.sizeSD=0 && Buffer size to store Owner's SID
m.pOwner=0 && Pointer to the Owner's SID
m.ownerName="" && Name of the file owner
m.domain_name="" && Name of the first domain for the owner
m.name_len=0 && Required length for the owner name
m.domain_len=0 && Required length for the domain name
m.nLength=0 && Length of the Windows Directory
m.deUse=0 && Pointer to a SID_NAME_USE enumerated type
&& indicating the type of the account
m.sdBuf=" " && Buffer for Security Descriptor
bSuccess=GetFileSecurity(m.szfilename, OWNER_SECURITY_INFORMATION, 0, 0,
@m.sizeSD)
* Create a buffer of the required size and call GetFileSecurity again
m.sdBuf=Space(sizeSD)
* Fill the buffer with the security descriptor of the object specified by
the
* filename parameter. The calling process must have the right to view the
specified
* aspects of the object's security status.
bSuccess=GetFileSecurity(m.szfilename, OWNER_SECURITY_INFORMATION, @m.sdBuf,
m.sizeSD, @m.sizeSD)
* Obtain the owner's SID from the Security Descriptor, exit if error
bSuccess=GetSecurityDescriptorOwner(@m.sdBuf, @m.pOwner, 0)
* Retrieve the name of the account and the name of the first domain on
* which this SID is found. Passes in the Owner's SID obtained previously.
* Call LookupAccountSid twice, the
* first time to obtain the required size of the owner and domain names.
bSuccess=LookupAccountSid(NULL, m.pOwner, @m.ownerName, @m.name_len,
@m.domain_name, @m.domain_len, @m.deUse)
* Allocate the required space in the name and domain_name string variables.
* Allocate 1 byte less to avoid the appended NULL character.
if m.name_len>1
ownerName=Space(m.name_len - 1)
domain_name=Space(m.domain_len -1 )
* Call LookupAccountSid again to actually fill in the name of the owner
* and the first domain.
bSuccess=LookupAccountSid(NULL, m.pOwner, @m.ownerName, @m.name_len,
@m.domain_name, @m.domain_len, @m.deUse)
Endif
Domain=m.domain_name
Owner=m.ownerName
Return Owner
* GetFileOwner_APIs
* Required from GetFileOwner
DECLARE INTEGER GetFileSecurity IN advapi32;
STRING lpFileName,;
INTEGER RequestedInformation,;
STRING @pSecurityDescriptor,;
INTEGER nLength,;
INTEGER @lpnLengthNeeded
DECLARE INTEGER GetSecurityDescriptorOwner IN advapi32;
STRING @pSecurityDescriptor,;
INTEGER @pOwner,;
INTEGER @lpbOwnerDefaulted
DECLARE INTEGER LookupAccountSid IN advapi32;
STRING @lpSystemName,;
INTEGER lpSid,;
STRING @lpName,;
INTEGER @cchName,;
STRING @lpRefdDomain,;
INTEGER @cchRefdDomain,;
INTEGER @peUse Tag: DataGrid Freeze the column Tag: 222221
Running FPW 2.6 code in VFP 9 - Buttons are white
I have an application written in FPW 2.6 that runs in 2.6 and VFP. I'm
used to running it in VFP 7.0. I just set up VFP 9.0 on the machine and
I've got the application running but the buttons on the FPW 2.6 screens
are colored white. The backgrounds on the screens are grey or blue. Is
there a way I can have the buttons the same color as the background?
Thanks.
Dan Tag: DataGrid Freeze the column Tag: 222210
any fix to redraw problem yet?
I still have this problem (VFP9 SP1, but it's been around for a while),
where labels and controls with labels like option buttons and checkboxes,
redraw themselves with a tiny < 1 pixel offset, when other controls on a
form are refreshed. The net result is that those controls, after a few
refreshes, become very icky looking, sort of bold-faced, only uglier.
I can get rid of it by setting visible = .t. to those controls, but having
to do this hack is getting really annoying.
Has this at least been acknowledged to be a problem? Any better workarounds
than mine? Tag: DataGrid Freeze the column Tag: 222209
newbie Change Parent Class Location
I have a VFP9.0 that was converted from VFP6.0.
One of the parent class was on E:\.......\_base.vcx
I need to change it to C:\......\_base.vcx
Suggestions?
TIA
Steve Tag: DataGrid Freeze the column Tag: 222207
File() Function - VP9
If I'm searching for "c:\filepath\myfile.ext" by calling
FILE("c:\filepath\myfile.ext") and "myfile.ext" is part of the "Other
Files" section in the project, then the FILE() function returns true
even though "myfile.ext" does not exist inside of "c:\filepath". This
happends ONLY when the program is compiled as an exe. The file function
works correctly when run from within the VFP IDE.
The VFP Help file states:
"If you do not include a path with the file name, Visual FoxPro
searches in the default directory for the file. If it cannot find the
file in the default directory, Visual FoxPro searches along the Visual
FoxPro path, which is established with SET PATH."
c:\filepath\ is included when i call the FILE() function and IS NOT
part of the PATH set by SET PATH.
Thanks! Tag: DataGrid Freeze the column Tag: 222205
dynamicreadonly
I have a grid. Is there a way to simulate the property
"DynamicReadOnly" ?
Mike Farnesi
San Diego Tag: DataGrid Freeze the column Tag: 222201
Is exclusive open of table faster
If you open a table exclusively does that make processing faster?
Anybody have any experience or documentation on this?? Tag: DataGrid Freeze the column Tag: 222193
class not registered..
Hi..guys.
I meet a problem in my customer side ..when calling the mscomm32.ocx ..its
out a error 'Class not registered' in workstation Window XP SP2. is it the
window xp setting problem? I used foxpro 6.0.
regards,
Orange Tag: DataGrid Freeze the column Tag: 222188
Report Problem
Hi All
When I Run report with reportlistener Preview (reportpreview.app) From
Button In Window TestForm Created in Top Form MainForm ShowWindow = 1
when report Finish All off properties Of The TestForm and data which I
created in load form from sql database and Connections lost
This Happen when Run From Exe File Only
any Id
I use Vfp9 Sp1
Thanks Tag: DataGrid Freeze the column Tag: 222187
White b/g isn't white?!
Hi,
I'm trying to make the backcolor of my form pure white. But I can't get
it to show that.
The backcolor of the form and the page is 255,255,255 and the page's
color source is 0 (Object's Color Properties).
Yet the form is clearly not white. I'm a little color blind so I can't
say for sure what the color is but it looks to me as slightly grayish
with a bit of pink.
The page tabs are white and it's quite obvious that the page itself is
not.
What am I missing?
This is VFP9
Thanks, Frank Tag: DataGrid Freeze the column Tag: 222182
VFP8 performance on low memory machines
I have an app that we have recently upgraded from VFP6 to VFP8. On machines
with a lot of memory the performance is very good, but on machines with less
memory the performance has degraded significantly.
The apps are being run locally. I have had a look at sys(3050) but I am not
sure whether it is the right approach to take.
Any suggestions? Tag: DataGrid Freeze the column Tag: 222162
i want to freeze 1st and 2th column in data grid when user scoll it .
Can I do that ??
thanks
> Hi Agnes
> > i want to freeze 1st and 2th column in data grid when user scoll it .
> Have a look at Grid.LockColumns and Grid.LockColumnsLeft
>
> Regards
> Bernhard Sander
>