I am using AJ.SENDFL to transfer data from pick to dos file. the dos
file was transfer but there are no content inside. May i know did i
miss any step?
CALL AJ.SendFL(0, "PARIS.SPOOLER.QUEUE", FILENAME, PC.FILE.NAME, 0,
RES)
THANKS
>From PB subroutine
1 Open with GP.FILEOPEN
2 file operations with GP.FILEREADBLOCK, GP.FILEWRITEBLOCK
GP.FILEREADCHAR .......
3 Close file with GP.FILECLOSE
>From VB You can use:
PB subroutine
or
read/write data to/from D3 with help Obj.ReadXXXX Obj.WriteXXXX
methods
read/write data to/from PC with VB methods
If need more info or sample ask me. You can se example of use
GP.FILExxxx subroutines in GPTOOL.LoadEtalon and GPTOOL.CheckAndUpdate
subroutines in GP_TERM.LIB
like this
CALL GP.FileOpen(FV,DOSPATH:DOSNAME,"MODEWRITE|MODECREATE|DECHEX")
.....
CALL GP.FileWriteBlock(FV,OBLOCK[CURLEN,5000])
....
CALL GP.FileClose(FV)
Best regards, Grigory
i am downloading the data in PB subroutine. I want to pass back the
file to vb.
How do i do it??
Regards
Winx is trying to download the PICK data to the Client PC.
Rgds,
I am sorry. What i mean is after finish downloading the data to pc, i
want to pass the filename of the file from pick subroutine to VB. How
do i do that?
Rgds
not very sure about yr question?
what do you want to do?
Rgds,
i want to pass back the result from my subroutine back to vb.
example: illustrate in steps
1. user key in path to download data (VB interface)
2. program call PB subroutine to download data.
3. Data download successful.
4. PB subroutine pass back result/error message to VB
5. VB program display the filename / error to user.
What i want to do is from step 4 and step 5.
Please let me know if you still do not understand. Thanks
:P
Rgds
What you want to do further? (after 5) I think that to copy the data
into a file and then it to process it not so well.
I just want to display error message to user if file is not saved and
the filename of the data if the file is download successful.
Thanks alot for your help.
:P
Dim ParamStr As Variant
ReDim ParamStr(2)
ParamStr(0) = "PickFileName"
ParamStr(1) = "PCfileName"
ParamStr(2) = ""
GPDOC.ExecSubEx "MyWriteSub", ParamStr
Dim SubRes As Long
SubRes = -1
While SubRes < 0
SubRes = GPDOC.GetSubResult(ParamStr)
DoEvents
Wend
================
'ParamStr(2) is result
=================
example for PB side
Sub MyWriteSub(PickFileName, PCfileName, ReturnValue)
ReturnValue=Something
RETURN
Regards,
Grigory
Text or Exel files are database too.
Besides ODBC and DAO you can use GP.ExcelXXXX subroutines set for
directly work with excel from PickBasic. Unfortunately are not
documentary yet
GP.ExcelWorkbookCreate
GP.ExcelWorkbookSub
GP.ExcelSub
GP.ExcelWorkbookFn
GP.ExcelApplicationFn
GP.ExcelWorksheetSub
GP.ExcelGPRangeClose
GP.ExcelRangeSub
GP.ExcelWorksheetFn
GP.ExcelApplicationSub
GP.ExcelApplicationCreate
GP.ExcelGPRangeFn
GP.ExcelGPRangeSub
GP.ExcelWorksheetCreate
GP.ExcelWorkbookClose
GP.ExcelApplicationClose
GP.ExcelRangeClose
GP.ExcelGPRangeCreate
GP.ExcelRangeCreate
GP.ExcelRangeFn
GP.ExcelWorkbookOpen
GP.ExcelFn
GP.ExcelWorksheetClose
For example list of methods only for GP.ExcelFn and GP.ExcelSub
"GetCreator","GetActivePrinter","SetActivePrinter","Calculate",
"GetDDEAppReturnCode","ExecuteExcel4Macro","Run","SendKeys","ActivateMicrosoftApp","AddCustomList","GetAlertBeforeOverwriting","SetAlertBeforeOverwriting",
"GetAltStartupPath","SetAltStartupPath","GetAskToUpdateLinks","SetAskToUpdateLinks",
"GetEnableAnimations","SetEnableAnimations","GetBuild","GetCalculateBeforeSave",
"SetCalculateBeforeSave","GetCalculation","SetCalculation","GetCanPlaySounds",
"GetCanRecordSounds","GetCaption","SetCaption","GetCellDragAndDrop",
"SetCellDragAndDrop","CentimetersToPoints","CheckSpelling","GetClipboardFormats",
"GetDisplayClipboardWindow","SetDisplayClipboardWindow","GetCommandUnderlines","SetCommandUnderlines",
"GetConstrainNumeric","SetConstrainNumeric","GetCopyObjectsWithCells","SetCopyObjectsWithCells",
"GetCursor",
"SetCursor","GetCustomListCount","GetCutCopyMode",
"SetCutCopyMode","GetDataEntryMode","SetDataEntryMode","Get_Default",
"GetDefaultFilePath","SetDefaultFilePath","DeleteChartAutoFormat","DeleteCustomList",
"GetDisplayAlerts","SetDisplayAlerts","GetDisplayFormulaBar","SetDisplayFormulaBar",
"GetDisplayFullScreen","SetDisplayFullScreen","GetDisplayNoteIndicator","SetDisplayNoteIndicator",
"GetDisplayCommentIndicator","SetDisplayCommentIndicator","GetDisplayExcel4Menus","SetDisplayExcel4Menus",
"GetDisplayRecentFiles",
"SetDisplayRecentFiles","GetDisplayScrollBars","SetDisplayScrollBars",
"GetDisplayStatusBar","SetDisplayStatusBar","DoubleClick","GetEditDirectlyInCell",
"SetEditDirectlyInCell","GetEnableAutoComplete","SetEnableAutoComplete",
"GetEnableCancelKey",
"SetEnableCancelKey","GetEnableSound","SetEnableSound","FindFile",
"GetFixedDecimal","SetFixedDecimal","GetFixedDecimalPlaces","SetFixedDecimalPlaces",
"GetCustomListNum","GetOpenFilename","GetSaveAsFilename","Goto",
"GetHeight","SetHeight","Help","GetIgnoreRemoteRequests",
"SetIgnoreRemoteRequests","InchesToPoints","InputBox","GetInteractive",
"SetInteractive","GetIteration","SetIteration","GetLeft",
"SetLeft","GetLibraryPath","MacroOptions","MailLogoff",
"MailLogon","GetMailSession","GetMailSystem",
"GetMathCoprocessorAvailable",
"GetMaxChange","SetMaxChange","GetMaxIterations","SetMaxIterations",
"GetMemoryFree","GetMemoryTotal","GetMemoryUsed","GetMouseAvailable",
"GetMoveAfterReturn","SetMoveAfterReturn","GetMoveAfterReturnDirection","SetMoveAfterReturnDirection",
"GetName","GetNetworkTemplatesPath","GetODBCTimeout","SetODBCTimeout",
"OnKey","OnRepeat","OnTime",
"OnUndo",
"GetOnWindow","SetOnWindow","GetOperatingSystem","GetOrganizationName",
"GetPath","GetPathSeparator","GetPivotTableSelection","SetPivotTableSelection",
"GetPromptForSummaryInfo","SetPromptForSummaryInfo","Quit","GetRecordRelative","GetReferenceStyle","SetReferenceStyle","RegisterXLL","Repeat","GetRollZoom","SetRollZoom","SaveWorkspace","GetScreenUpdating",
"SetScreenUpdating","SetDefaultChart","GetSheetsInNewWorkbook","SetSheetsInNewWorkbook","GetShowChartTipNames","SetShowChartTipNames","GetShowChartTipValues","SetShowChartTipValues","GetStandardFont","SetStandardFont","GetStandardFontSize","SetStandardFontSize",
"GetStartupPath","GetStatusBar","SetStatusBar","GetTemplatesPath","GetShowToolTips","SetShowToolTips","GetTop","SetTop",
"GetDefaultSaveFormat","SetDefaultSaveFormat","GetTransitionMenuKey","SetTransitionMenuKey","GetTransitionMenuKeyAction","SetTransitionMenuKeyAction","GetTransitionNavigKeys","SetTransitionNavigKeys","Undo","GetUsableHeight","GetUsableWidth","GetUserControl",
"SetUserControl","GetUserName_","SetUserName","GetValue","GetVersion","GetVisible","SetVisible","Volatile","Wait","GetWidth","SetWidth","GetWindowsForPens","GetWindowState","SetWindowState","GetUILanguage","SetUILanguage",
"GetDefaultSheetDirection","SetDefaultSheetDirection","GetCursorMovement","SetCursorMovement","GetControlCharacters","SetControlCharacters","GetEnableEvents","SetEnableEvents","GetCountApplication","GetCountRange","RemoveAllExcelControl","RemoveExcelControl"
Regards,
Grigory
How to send a windows binary item from Server to client PC?
Rgds,
1 Save Item on server as HEX dump
2 Copy Item to PC from HEX
-----------------------------
for 1
-----------------------------
You can Use GPTOOL.LoadEtalon see in
http://briz.infotools.ru/html/004/prog33n2.htm
or use code:
CALL GP.FileOpen(FV,DOSPATH,"MODEREAD|DECHEX")
IF FV<1>>=0 THEN
CALL GP.FileGetLength(FV,MAXLEN)
CurLen=1;
Zap=""
LOOP
CALL GP.FileReadBlock(FV,OBLOCK,20000)
Zap:=oBlock
CurLen+=20000
IF CurLen>MaxLen THEN EXIT
REPEAT
WRITE Zap ON psf,PickRecord
CALL GP.FileClose(FV)
END ELSE
CRT "ERROR OPENING ":DosPath:" ":DosName
END
===============
-----------------------------
for 2
You can Use GPTOOL.CheckAndUpdate
http://briz.infotools.ru/html/007/prog42jp.htm
or use code :
-----------------------------
OPEN PickFile TO psf THEN
READ oBlock FROM psf,PickRecord THEN
CALL GP.FileOpen(FV,DOSPATH:DOSNAME,"MODEWRITE|MODECREATE|DECHEX")
IF FV<1>>=0 THEN
LOOP
CALL GP.FileWriteBlock(FV,OBLOCK[CURLEN,5000])
CurLen+=5000
IF CurLen>MaxLen THEN EXIT
REPEAT
CALL GP.FileClose(FV)
END
END
END ELSE
CRT "ERROR OPENING ":PickFile
END
-----------------------------
read more about service subroutines at
http://briz.infotools.ru/html/030/prog5dpw.htm
about working with PC files at
http://briz.infotools.ru/html/002/sysfile.htm and at
http://briz.infotools.ru/html/028/iofile1.htm and at
http://briz.infotools.ru/html/033/prog6ieb.htm
Regards, Grigory