🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.visual.misc
7 messages
7 total messages Started by Orjan Esperi Sun, 26 Nov 1995 00:00
Scheduling a VB app as a NT AT job?
#290
Author: Orjan Esperi
Date: Sun, 26 Nov 1995 00:00
65 lines
3184 bytes
Need some help!

I've posted this one previously in a few .ms-windows.nt. groups but 
with no luck yet.

I am trying to schedule a 16-bit VB/ODBC application to run using the
AT command. I am using NT Server 3.5.

At least three question arises.

QUESTION NO 1:
Is it possible to connect to an ODBC source 
using the System account for Schedule? (the ODBC
source is pointing to a SQL-server database on the same
machine).

QUESTION NO 2:
Is it possible to start a 16 bit VB application using AT/Schedule?

QUESTION NO 3:
This is a more general one. What can and can't be done using NT in
the field of scheduling jobs. What are the limitations? Is there any
other way to accomplish what I am trying to do?

Below is a short description of what I tried to do.

When I start Schedule using the System account with the switch
"Allow Service to Interact with Desktop" selected the app starts.
But when the app is doing an automatic  login to an ODBC source
the login failes with error message:

"SQLState: '01000', SQL Server Error: 2, [Microsoft][ODBC SQL
Server Driver][DBNMPNTW]ConnectionOpen (CretateFile()).
Connection Failed: SQLState: '08001', SQL Server Error: 0
[Microsoft][ODBC SQL Server Driver]Unable to connect to data source"

It is my app formatting the message but it's comming from the
ODBC driver. After this message the default login dialog for the ODBC
driver displays. When I try to select a database in the combo box the 
same error occurs again.

When my first attempt failed I started Schedule using an
ordinary user account (I created a user with membership in the
Administrators group). This didn't even start the VB app! The
only thing showing was an error message: "Unexpected error,
quitting!".

Instead of trying to start my app I let AT start Notepad.
This went fine. A also tried som other 32-bit apps and they seemed
to work allright. Then I tried several 16-bit applications, none of
them orked all the way. They either gave me the Unexpected messsage
or didn't say anything at all or came halfway before quitting. I even
tried the simplest VB app possible. It too gave me Unexpected....

I have not tried using 32-bit VB yet.

Any suggestions and hints are very welcome!

-- Orjan

Orjan Esperi
Business Objects AB
Zachaus Grans 7
S-451 30 UDDEVALLA
SWEDEN
Re: Scheduling a VB app as a NT AT job?
#291
Author: Jeffrey S. Kirkham
Date: Sun, 26 Nov 1995 00:00
74 lines
3666 bytes
In article <499u21$svi@stella.tip.net> orjan.esperi@boab.se (Orjan Esperi) writes:
>From: orjan.esperi@boab.se (Orjan Esperi)
>Subject: Scheduling a VB app as a NT AT job?
>Date: Sun, 26 Nov 1995 14:16:29 GMT

Check the ODBC source. The problem maybe your 16bit app attempting to connect 
to a 16bit ODBC sorce not a 32bit ODBC source. You didn't say if the 16bit app 
works WITHOUT sheduler.

>Need some help!

>I've posted this one previously in a few .ms-windows.nt. groups but 
>with no luck yet.

>I am trying to schedule a 16-bit VB/ODBC application to run using the
>AT command. I am using NT Server 3.5.

>At least three question arises.

>QUESTION NO 1:
>Is it possible to connect to an ODBC source 
>using the System account for Schedule? (the ODBC
>source is pointing to a SQL-server database on the same
>machine).

>QUESTION NO 2:
>Is it possible to start a 16 bit VB application using AT/Schedule?

>QUESTION NO 3:
>This is a more general one. What can and can't be done using NT in
>the field of scheduling jobs. What are the limitations? Is there any
>other way to accomplish what I am trying to do?

>Below is a short description of what I tried to do.

>When I start Schedule using the System account with the switch
>"Allow Service to Interact with Desktop" selected the app starts.
>But when the app is doing an automatic  login to an ODBC source
>the login failes with error message:

>"SQLState: '01000', SQL Server Error: 2, [Microsoft][ODBC SQL
>Server Driver][DBNMPNTW]ConnectionOpen (CretateFile()).
>Connection Failed: SQLState: '08001', SQL Server Error: 0
>[Microsoft][ODBC SQL Server Driver]Unable to connect to data source"

>It is my app formatting the message but it's comming from the
>ODBC driver. After this message the default login dialog for the ODBC
>driver displays. When I try to select a database in the combo box the 
>same error occurs again.

>When my first attempt failed I started Schedule using an
>ordinary user account (I created a user with membership in the
>Administrators group). This didn't even start the VB app! The
>only thing showing was an error message: "Unexpected error,
>quitting!".

>Instead of trying to start my app I let AT start Notepad.
>This went fine. A also tried som other 32-bit apps and they seemed
>to work allright. Then I tried several 16-bit applications, none of
>them orked all the way. They either gave me the Unexpected messsage
>or didn't say anything at all or came halfway before quitting. I even
>tried the simplest VB app possible. It too gave me Unexpected....

>I have not tried using 32-bit VB yet.

>Any suggestions and hints are very welcome!

>-- Orjan

>Orjan Esperi
>Business Objects AB
>Zachaus Grans 7
>S-451 30 UDDEVALLA
>SWEDEN
Re: Scheduling a VB app as a NT AT job?
#292
Author: Orjan Esperi
Date: Tue, 28 Nov 1995 00:00
25 lines
1626 bytes
Jeffrey, thank you for responding!

> Check the ODBC source. The problem maybe your 16bit app attempting to connect 
> to a 16bit ODBC sorce not a 32bit ODBC source. You didn't say if the 16bit app 
> works WITHOUT sheduler.

The app works fine when run interactively (without Schedule). It's
using a 32-bit ODBC source (sql server).

The app starts when run using Schedule (System account). But it can't
connect to the ODBC source.

The app won't even start when using Schedule (User account).

My problem seem to be rather unique or there is noone out there having
a solution to it.

I will post my solution, if I find one...

-- Orjan
Orjan Esperi
Business Objects AB
Zachaus Grans 7
S-451 30 UDDEVALLA
SWEDEN
Re: Scheduling a VB app as a NT AT job?
#293
Author: Jeffrey S. Kirkham
Date: Tue, 28 Nov 1995 00:00
38 lines
2238 bytes
In article <49emv6$cqr@stella.tip.net> orjan.esperi@boab.se (Orjan Esperi) writes:
>From: orjan.esperi@boab.se (Orjan Esperi)
>Subject: Re: Scheduling a VB app as a NT AT job?
>Date: Tue, 28 Nov 1995 10:06:56 GMT

>Jeffrey, thank you for responding!

>> Check the ODBC source. The problem maybe your 16bit app attempting to connect 
>> to a 16bit ODBC sorce not a 32bit ODBC source. You didn't say if the 16bit app 
>> works WITHOUT sheduler.

>The app works fine when run interactively (without Schedule). It's
>using a 32-bit ODBC source (sql server).

>The app starts when run using Schedule (System account). But it can't
>connect to the ODBC source.

>The app won't even start when using Schedule (User account).

>My problem seem to be rather unique or there is noone out there having
>a solution to it.

>I will post my solution, if I find one...

>-- Orjan
>Orjan Esperi
>Business Objects AB
>Zachaus Grans 7
>S-451 30 UDDEVALLA
>SWEDEN

I'm not giving up that easy. Remember ODBC sources are stored under the 
current user. Make sure the scheduler user has the same ODBC source setup. 
Also, How are you handling security on the SQL server? IS the app hardcoded 
with password in the connect property?

Keep in touch with me on this. I want to solve it to.
JK
Re: Scheduling a VB app as a NT AT job?
#294
Author: Orjan Esperi
Date: Thu, 30 Nov 1995 00:00
48 lines
2828 bytes
> I'm not giving up that easy. Remember ODBC sources are stored 
> under the current user.
> Make sure the scheduler user has the same ODBC source setup. 

I have been thinking about this one too. When I use any account
except the System the VB app don't even load. So that has noting
to do with ODBC. But, yes, I have set up a source for the user I am
using.

When using the System account the app starts and breaks when trying
to connect with ODBC.  But the big question is: How do i set up an 
ODBC source for the System account? From what I know the System
account is not an ordinary account.

> Also, How are you handling security on the SQL server?
> IS the app hardcoded with password in the connect property?

It is hardcoded into the app. SQL server is set up to handle the
login by it self. I don't use Integrated Security.


I have ordered an upgrade of my VB 3 to VB 4. When I'll get it
I'll try it with a 32-bit VB app.

MICROSOFT DON'T SUPPORT THEIR PRODUCTS!

One thing about Microsoft. I can't get any help from them
because they have a stinking support policy. This is in 
Sweden so I don't know if it's the same elsewhere.
On backoffice products like NT Server there is not a single
day support. I repeat NOT ONE DAY!. On developer products
there is 30 days. But what if I have a problem day 31. The
answer from Microsoft is that I have to buy support by the
hour or to get a separate support agreement.

From my point of view it should be illegal to sell products this way!
Especially when their products don't come free. Microsoft can afford 
it but they seem to invest their money on other things than on 
support. I am normally a  fan of Microsoft but I am a bit scared of 
where Microsoft is going in the future?!

-- orjan

Orjan Esperi
Business Objects AB
Zachaus Grand 7
S-451 30 UDDEVALLA
SWEDEN
Re: Scheduling a VB app as a NT AT job?
#295
Author: John Murray
Date: Thu, 30 Nov 1995 00:00
8 lines
1263 bytes
	Not familiar w/ the ODBC issue; however, take heart, I am running
numerous 16b VB apps under the scheduler (although this is under
nt3.51).  One problem that I have come accross; however, is using
Crystal in an application that runs from the scheduler..I can get it
to run fine when I bring it up; however, it wont run through the
scheduler (although scheduler is set up to use my user ID).

John
Re: Scheduling a VB app as a NT AT job?
#296
Author: Jeffrey S. Kirkham
Date: Fri, 01 Dec 1995 00:00
63 lines
3580 bytes
In article <49kn1c$cpu@stella.tip.net> orjan.esperi@boab.se (Orjan Esperi) writes:
>From: orjan.esperi@boab.se (Orjan Esperi)
>Subject: Re: Scheduling a VB app as a NT AT job?
>Date: Thu, 30 Nov 1995 04:46:19 GMT

>> I'm not giving up that easy. Remember ODBC sources are stored 
>> under the current user.
>> Make sure the scheduler user has the same ODBC source setup. 

>I have been thinking about this one too. When I use any account
>except the System the VB app don't even load. So that has noting
>to do with ODBC. But, yes, I have set up a source for the user I am
>using.

>When using the System account the app starts and breaks when trying
>to connect with ODBC.  But the big question is: How do i set up an 
>ODBC source for the System account? From what I know the System
>account is not an ordinary account.

This is where I would focus. The administrator account is not different in 
regards to running applications. Get the program running under the 
administrator account. THEN with the scheduler, THEN you can turn to the user 
accounts. It sounds like there are several problems. 

>> Also, How are you handling security on the SQL server?
>> IS the app hardcoded with password in the connect property?

>It is hardcoded into the app. SQL server is set up to handle the
>login by it self. I don't use Integrated Security.


>I have ordered an upgrade of my VB 3 to VB 4. When I'll get it
>I'll try it with a 32-bit VB app.

Don't compond the problem with VB4. You will need to setup all new data 
sources as soon as you go to 32bits.

>MICROSOFT DON'T SUPPORT THEIR PRODUCTS!

>One thing about Microsoft. I can't get any help from them
>because they have a stinking support policy. This is in 
>Sweden so I don't know if it's the same elsewhere.
>On backoffice products like NT Server there is not a single
>day support. I repeat NOT ONE DAY!. On developer products
>there is 30 days. But what if I have a problem day 31. The
>answer from Microsoft is that I have to buy support by the
>hour or to get a separate support agreement.

>From my point of view it should be illegal to sell products this way!
>Especially when their products don't come free. Microsoft can afford 
>it but they seem to invest their money on other things than on 
>support. I am normally a  fan of Microsoft but I am a bit scared of 
>where Microsoft is going in the future?!

Sorry, being a radical Capitalist I can't complain. 

>-- orjan

>Orjan Esperi
>Business Objects AB
>Zachaus Grand 7
>S-451 30 UDDEVALLA
>SWEDEN
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads