Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Virtual Store problem

5 posts in General Discussion Last posting was on 2013-03-15 19:30:25.0Z
Panos Posted on 2013-03-14 08:41:02.0Z
Sender: 559.51418a93.1804289383@sybase.com
From: Panos
Newsgroups: sybase.public.powerbuilder.general
Subject: Virtual Store problem
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <51418d1e.644.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 14 Mar 2013 00:41:02 -0800
X-Trace: forums-1-dub 1363250462 172.20.134.41 (14 Mar 2013 00:41:02 -0800)
X-Original-Trace: 14 Mar 2013 00:41:02 -0800, 172.20.134.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249933
Article PK: 1308358

Hi,
our application depends on creating files to print receipts
to thermal printers. Since Vista/Win7 craze we have lots of
problems with the permissions.

In order to have the user understand that when they cannot
print, it means that they cannot write receipt.asc to the
application folder,I check the Fileopen return value.

The akward thing is that it returns 1 although it does not
create the file because it creates it into the Windows
Virtual Store directory. So it gets Success (although that
the file is not created where it was supposed to) but no
printing. Is there a compatible way to override it?

It is very difficult to maintain hundred of computers with
the application and not have the user know that the
no-printing issue is due to Windows Permissions...


Jeremy.Lakeman Posted on 2013-03-14 12:30:16.0Z
Sender: 11ba.5141ba47.1804289383@sybase.com
From: Jeremy.Lakeman@gmail.com
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: Virtual Store problem
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <5141c2d8.1501.1681692777@sybase.com>
References: <51418d1e.644.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 14 Mar 2013 04:30:16 -0800
X-Trace: forums-1-dub 1363264216 172.20.134.41 (14 Mar 2013 04:30:16 -0800)
X-Original-Trace: 14 Mar 2013 04:30:16 -0800, 172.20.134.41
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249934
Article PK: 1308359

Easy, don't save files into the application folder.
Save them to the temp directory instead.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx

> Hi,
> our application depends on creating files to print
> receipts to thermal printers. Since Vista/Win7 craze we
> have lots of problems with the permissions.
>
> In order to have the user understand that when they cannot
> print, it means that they cannot write receipt.asc to the
> application folder,I check the Fileopen return value.
>
> The akward thing is that it returns 1 although it does not
> create the file because it creates it into the Windows
> Virtual Store directory. So it gets Success (although that
> the file is not created where it was supposed to) but no
> printing. Is there a compatible way to override it?
>
> It is very difficult to maintain hundred of computers with
> the application and not have the user know that the
> no-printing issue is due to Windows Permissions...


Panos Posted on 2013-03-14 12:55:28.0Z
Sender: 1506.5141c2f6.1804289383@sybase.com
From: Panos
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: Virtual Store problem
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <5141c8c0.162a.1681692777@sybase.com>
References: <5141c2d8.1501.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 14 Mar 2013 04:55:28 -0800
X-Trace: forums-1-dub 1363265728 172.20.134.41 (14 Mar 2013 04:55:28 -0800)
X-Original-Trace: 14 Mar 2013 04:55:28 -0800, 172.20.134.41
Lines: 59
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249935
Article PK: 1308360

Unfortunately I have a range of clients from Win2000 to
Win8.

But this is a very good oportunity to ask for advice.

I treat the prints as:
1)I create a text file inside the application folder
2)I append data
3)I close the file
4)I sent the file to the printer or a COM/LPT port like
this:
Choose Case env.ostype
Case Windows!
ls_command = 'command.com /c '
Case WindowsNT!
ls_command = 'cmd.exe /c '
Case else
ls_command = 'cmd.exe /c '
End Choose

ls_command = ls_command + ' copy receipt.asc' + ' ' +
gs_printer

RunWait(ls_command,0)

I want a way to get out of it!
I do not want to be dependable by Windows Permissions, OS
features, cmd.exe and Runwait.dll peculiarities any more!

Any advice is welcome guys!

Thanx!

> Easy, don't save files into the application folder.
> Save them to the temp directory instead.
>
>
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
>
> > Hi,
> > our application depends on creating files to print
> > receipts to thermal printers. Since Vista/Win7 craze we
> > have lots of problems with the permissions.
> >
> > In order to have the user understand that when they
> > cannot print, it means that they cannot write
> > receipt.asc to the application folder,I check the
> Fileopen return value. >
> > The akward thing is that it returns 1 although it does
> > not create the file because it creates it into the
> > Windows Virtual Store directory. So it gets Success
> > (although that the file is not created where it was
> > supposed to) but no printing. Is there a compatible way
> to override it? >
> > It is very difficult to maintain hundred of computers
> > with the application and not have the user know that the
> > no-printing issue is due to Windows Permissions...


Mark L Posted on 2013-03-15 13:03:19.0Z
From: Mark L <mlibner@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: Virtual Store problem
References: <5141c2d8.1501.1681692777@sybase.com> <5141c8c0.162a.1681692777@sybase.com>
In-Reply-To: <5141c8c0.162a.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <51431c17$1@forums-1-dub>
Date: 15 Mar 2013 05:03:19 -0800
X-Trace: forums-1-dub 1363352599 172.20.134.152 (15 Mar 2013 05:03:19 -0800)
X-Original-Trace: 15 Mar 2013 05:03:19 -0800, vip152.sybase.com
Lines: 68
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249955
Article PK: 1308401

Hi Panos,

My first guess would be to create your file in the temp folder. You can
get its location from the TEMP environment variable that windows uses.

hth,
Mark

On 3/14/2013 8:55 AM, Panos wrote:
> Unfortunately I have a range of clients from Win2000 to
> Win8.
>
> But this is a very good oportunity to ask for advice.
>
> I treat the prints as:
> 1)I create a text file inside the application folder
> 2)I append data
> 3)I close the file
> 4)I sent the file to the printer or a COM/LPT port like
> this:
> Choose Case env.ostype
> Case Windows!
> ls_command = 'command.com /c '
> Case WindowsNT!
> ls_command = 'cmd.exe /c '
> Case else
> ls_command = 'cmd.exe /c '
> End Choose
>
> ls_command = ls_command + ' copy receipt.asc' + ' ' +
> gs_printer
>
> RunWait(ls_command,0)
>
> I want a way to get out of it!
> I do not want to be dependable by Windows Permissions, OS
> features, cmd.exe and Runwait.dll peculiarities any more!
>
> Any advice is welcome guys!
>
> Thanx!
>
>
>
>> Easy, don't save files into the application folder.
>> Save them to the temp directory instead.
>>
>>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
>>
>>> Hi,
>>> our application depends on creating files to print
>>> receipts to thermal printers. Since Vista/Win7 craze we
>>> have lots of problems with the permissions.
>>>
>>> In order to have the user understand that when they
>>> cannot print, it means that they cannot write
>>> receipt.asc to the application folder,I check the
>> Fileopen return value. >
>>> The akward thing is that it returns 1 although it does
>>> not create the file because it creates it into the
>>> Windows Virtual Store directory. So it gets Success
>>> (although that the file is not created where it was
>>> supposed to) but no printing. Is there a compatible way
>> to override it? >
>>> It is very difficult to maintain hundred of computers
>>> with the application and not have the user know that the
>>> no-printing issue is due to Windows Permissions...


Andreas Mykonios Posted on 2013-03-15 19:30:25.0Z
From: Andreas Mykonios <Andreas Mykonios>
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: Virtual Store problem
Message-ID: <gdt6k8ptdqvk8vcfieglh1e2fonm0mp539@4ax.com>
References: <5141c2d8.1501.1681692777@sybase.com> <5141c8c0.162a.1681692777@sybase.com>
X-Newsreader: Forte Agent 4.2/32.1118
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 15 Mar 2013 11:30:25 -0800
X-Trace: forums-1-dub 1363375825 172.20.134.152 (15 Mar 2013 11:30:25 -0800)
X-Original-Trace: 15 Mar 2013 11:30:25 -0800, vip152.sybase.com
Lines: 72
X-Authenticated-User: pb125beta
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249962
Article PK: 1308413

Hi Panos.

Temp folder i not always a good idea... I would prefer to create an
application folder under the user profile... The user profile path
info can be found through .net, through api call, and there should be
also an environment variable named HOMEPATH pointing to that folder...
I'm not sure if the last one existed in win2000, but api calls were
working at that release to get that info.

Andreas.

On 14 Mar 2013 04:55:28 -0800, Panos wrote:

>Unfortunately I have a range of clients from Win2000 to
>Win8.
>
>But this is a very good oportunity to ask for advice.
>
>I treat the prints as:
>1)I create a text file inside the application folder
>2)I append data
>3)I close the file
>4)I sent the file to the printer or a COM/LPT port like
>this:
>Choose Case env.ostype
> Case Windows!
> ls_command = 'command.com /c '
> Case WindowsNT!
> ls_command = 'cmd.exe /c '
> Case else
> ls_command = 'cmd.exe /c '
>End Choose
>
>ls_command = ls_command + ' copy receipt.asc' + ' ' +
>gs_printer
>
>RunWait(ls_command,0)
>
>I want a way to get out of it!
>I do not want to be dependable by Windows Permissions, OS
>features, cmd.exe and Runwait.dll peculiarities any more!
>
>Any advice is welcome guys!
>
>Thanx!
>
>
>
>> Easy, don't save files into the application folder.
>> Save them to the temp directory instead.
>>
>>
>http://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
>>
>> > Hi,
>> > our application depends on creating files to print
>> > receipts to thermal printers. Since Vista/Win7 craze we
>> > have lots of problems with the permissions.
>> >
>> > In order to have the user understand that when they
>> > cannot print, it means that they cannot write
>> > receipt.asc to the application folder,I check the
>> Fileopen return value. >
>> > The akward thing is that it returns 1 although it does
>> > not create the file because it creates it into the
>> > Windows Virtual Store directory. So it gets Success
>> > (although that the file is not created where it was
>> > supposed to) but no printing. Is there a compatible way
>> to override it? >
>> > It is very difficult to maintain hundred of computers
>> > with the application and not have the user know that the
>> > no-printing issue is due to Windows Permissions...