From jwcolby at colbyconsulting.com Wed Aug 3 22:08:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:08:40 -0400
Subject: [dba-VB] Inheriting collections
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007b01c598a1$d0afdcb0$6c7aa8c0@ColbyM6805>
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 3 22:11:08 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:11:08 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
Has anyone seen anything indicating the relative speed between "identical
code" in these two languages? I went looking for a way to test .net code
and promptly got bogged down in issues like data collection distorting the
numbers etc. I'm just wondering if anyone has a feel for the relative
speeds? Similar, very different?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Wed Aug 3 22:21:33 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Thu, 04 Aug 2005 13:21:33 +1000
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
References: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between "identical
> code" in these two languages? I went looking for a way to test .net code
> and promptly got bogged down in issues like data collection distorting the
> numbers etc. I'm just wondering if anyone has a feel for the relative
> speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From jwcolby at colbyconsulting.com Wed Aug 3 22:41:18 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:41:18 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
Message-ID: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Yea I read that, but that is vb not vba.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, August 03, 2005 11:22 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Speed - vb.net vs vba
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between
> "identical code" in these two languages? I went looking for a way to
> test .net code and promptly got bogged down in issues like data
> collection distorting the numbers etc. I'm just wondering if anyone
> has a feel for the relative speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Thu Aug 4 01:09:50 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 03 Aug 2005 23:09:50 -0700
Subject: [dba-VB] Speed - vb.net vs vba
References: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Message-ID: <42F1B12E.4020904@shaw.ca>
Well I could show you how to write direct Intel Machine OpCode via DOS
copy con: c:\temp\myprog.exe
No assembler no nothing, but would you want to do it.
Most speed can be gained by proper algorithms at times compilers can be
irrelevant
http://www.xbeat.net/vbspeed/index.htm
John W. Colby wrote:
>Yea I read that, but that is vb not vba.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
>Sent: Wednesday, August 03, 2005 11:22 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] Speed - vb.net vs vba
>
>
>On 3 Aug 2005 at 23:11, John W. Colby wrote:
>
>
>
>>Has anyone seen anything indicating the relative speed between
>>"identical code" in these two languages? I went looking for a way to
>>test .net code and promptly got bogged down in issues like data
>>collection distorting the numbers etc. I'm just wondering if anyone
>>has a feel for the relative speeds? Similar, very different?
>>
>>
>>
>
>Try
>http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From Jdemarco at hudsonhealthplan.org Thu Aug 4 07:00:13 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Thu, 4 Aug 2005 08:00:13 -0400
Subject: [dba-VB] Inheriting collections
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
I was pretty busy at the time of your original post but a quick take would be that inheriting from a collection will help keep your syntax a bit cleaner:
objSysVarTbl.CollectionMethod
objSysVarTbl.CollectionObject.CollectionMethod
HTH
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Wednesday, August 03, 2005 11:09 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Inheriting collections
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From jwcolby at colbyconsulting.com Tue Aug 9 13:04:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 14:04:22 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
Message-ID: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Tue Aug 9 14:04:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Tue, 9 Aug 2005 15:04:49 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 16:17:41 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 17:17:41 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To:
Message-ID: <008601c59d27$c6b8c390$6c7aa8c0@ColbyM6805>
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 18:24:57 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 19:24:57 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
Message-ID: <008701c59d39$91847180$6c7aa8c0@ColbyM6805>
This is what I found for doing this:
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
>From this article:
http://www.dotnetbips.com/51AA8C48-7DD4-416B-A9D2-63C26644C120.aspx?articlei
d=28
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 10 06:10:42 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 10 Aug 2005 07:10:42 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
I'm not sure that you have to be logged in. But I am using it on Windows
2003 Server under the administrator account.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 5:18 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From listmaster at databaseadvisors.com Sun Aug 14 08:50:58 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Sun, 14 Aug 2005 09:50:58 -0400
Subject: [dba-VB] Administrivia - Lists Temporarily Down
Message-ID: <42FF1402.5531.150D8B@listmaster.databaseadvisors.com>
The company that hosts our lists will be doing some maintenance on
their network from 11PM Aug 16 to 6 AM Aug 17 CST (04:00 to 11:00 on
Aug 17 UTC - http://www.timezoneconverter.com/cgi-bin/tzc.tzc to find
out what time it is in your timezone))
They are upgrading their core routers, which will cause dba's list,
and associated web pages (not the Website, but the list pages,
including archives) to be down, anywhere from a few minutes to an
hour.
Hopefully this does not cause anyone too much of an inconvenience.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
If you can't be a good example, then you'll just have to be a
horrible warning.
From R.Griffiths at bury.gov.uk Tue Aug 16 10:46:56 2005
From: R.Griffiths at bury.gov.uk (Griffiths, Richard)
Date: Tue, 16 Aug 2005 16:46:56 +0100
Subject: [dba-VB] Update BE
Message-ID: <200508161536.j7GFan926891@smarthost.yourcomms.net>
Hi
After advice/resources.
I have written an application using vb.net which is to run with A2K BE
and SQL 2000 BE.
I am trying to think about how to update the back end. I have a number
of options, one being to write VB code and using DAO or ADO update the
BE. But I think this will involve further deployment of VB and Jet/Vba
and MS Access (runtime) etc.
The other option (no doubt there are others) is to write CREATE TABLE
and ALTER TABLE statements (and this can be deployed within a exe
running vb.net). I think this is tidier, however there is not much
documentation on this process ( CREATE TABLE and ALTER TABLE etc) for MS
Access. Does anyone have code and/or can offer good sources on the web
to help me here. Any other solutions?
Many thanks
Richard
From jwcolby at colbyconsulting.com Thu Aug 18 10:32:27 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:32:27 -0400
Subject: [dba-VB] Running an app from a service
Message-ID: <011101c5a40a$0d5a3110$6c7aa8c0@ColbyM6805>
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Thu Aug 18 10:37:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:37:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 10:59:14 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:59:14 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
Message-ID: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 10:58:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:58:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:11:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:11:28 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
Message-ID: <011901c5a40f$7d2e05c0$6c7aa8c0@ColbyM6805>
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
From DWUTKA at marlow.com Thu Aug 18 11:14:23 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 11:14:23 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
LOL. Jack of all trades, master of none! ;)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 11:11 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:38:24 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:38:24 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
Message-ID: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
I prefer to be Jack of all trades, master of one.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 12:14 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. Jack of all trades, master of none! ;)
Drew
From carbonnb at gmail.com Thu Aug 18 13:30:45 2005
From: carbonnb at gmail.com (Bryan Carbonnell)
Date: Thu, 18 Aug 2005 14:30:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
References: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
<011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
Message-ID:
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
From DWUTKA at marlow.com Thu Aug 18 13:33:11 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 13:33:11 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:01:12 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:01:12 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To:
Message-ID: <011f01c5a427$36fbab30$6c7aa8c0@ColbyM6805>
ROTFL. It changes year to year. And of course I get a LOT of arguments
whether I am even an apprentice at anything.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
Sent: Thursday, August 18, 2005 2:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:02:15 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:02:15 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Message-ID: <012001c5a427$5e1213d0$6c7aa8c0@ColbyM6805>
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:13:46 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:13:46 -0400
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Message-ID: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Thu Aug 18 14:21:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:21:28 -0400
Subject: [dba-VB] NSpring
Message-ID: <012401c5a42a$0bdcab40$6c7aa8c0@ColbyM6805>
Has anyone looked at / evaluated / used Nspring -
http://sourceforge.net/projects/nspring
I am in need of a good logger, and I use collections a LOT in my programming
so this also looks promising on that front. I understand that I can just
reference the project from my code so it should not matter too much that I
choose VB.Net and this stuff is in C#, correct?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From ridermark at gmail.com Thu Aug 18 14:26:17 2005
From: ridermark at gmail.com (Mark Rider)
Date: Thu, 18 Aug 2005 14:26:17 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
References: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
<012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Message-ID:
In the registry under HKCU\Software\Microsoft\VisualStudio\7.1 there
is a ProjectMRUList key and a FileMRUList key. Deleting the strings
in there will clear it all out.
May be a bit heavy handed, but that is the only way I have found to do it.
--
Mark Rider
http://commonsensesecurity.info
There are 10 kinds of people in the world:
Those who understand binary and those who don't.
From DWUTKA at marlow.com Thu Aug 18 17:25:42 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:25:42 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 17:26:12 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:26:12 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
Message-ID: <123701F54509D9119A4F00D0B747349016DDC3@main2.marlow.com>
I would guess it's in the registry.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:14 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Clearing the history list in .net IDE
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 17:58:45 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 18:58:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
Message-ID: <012701c5a448$6843edd0$6c7aa8c0@ColbyM6805>
Uh..no, psycho maybe.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 6:26 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 20:57:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 21:57:47 -0400
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Thu Aug 18 21:39:05 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Fri, 19 Aug 2005 12:39:05 +1000
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305D2E9.11360.31C0985@stuart.lexacorp.com.pg>
On 18 Aug 2005 at 21:57, John W. Colby wrote:
....
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
>
.....
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
Do you have an SMTP server running on your local machine?
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas?
Not really, but SMTP certainly shouldn't be going anywhere near anything
called ".web.http....."
If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
Try Blat.DLL from http://www.geocities.com/toby_korn/blat/
It's easy to use and I can talk you through it if you run into problems.
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From ebarro at afsweb.com Thu Aug 18 21:54:34 2005
From: ebarro at afsweb.com (Eric Barro)
Date: Thu, 18 Aug 2005 19:54:34 -0700
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID:
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document, previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in respect of such communication.
From jwcolby at colbyconsulting.com Thu Aug 18 22:08:35 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 23:08:35 -0400
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To:
Message-ID: <013101c5a46b$4cabf180$6c7aa8c0@ColbyM6805>
I am attempting to create a system that will take data from a database,
export it into a text file, then send that file as an attachment to an email
to an insurance company. Later I will need to get an FTP channel going to
send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
just have DotNet directly send the email.
My home office is connected to the internet via the cable company. They do
port 25 blocking, forcing me to send to their SMTP server (from here at my
office). It was for that reason that I sent to mail.optonline.com, as that
is the SMTP server address used by my Outlook (from my home office). I am
actually in the process of switching to a new hosting company that will
allow me to use an alternate port to transmit email. That will still
require me to hit that company's SMTP server, but at least I can send from
anywhere I may be working to the same SMTP address. As it currently stands,
I have to constantly futz with the SMTP server address as I move my laptop
from my home to my client to my sister-in-law etc. All three of those
locations goes through a ISP that performs port 25 blocking.
Anyway.....
I am trying to set up email for my vb.net program. It would be nice if it
just worked, from wherever I plopped it down. And, of course, I do not
understand anything about email, SMTP servers, or even vb.net. I guess that
would make me jack of all trades... ;-) Or at least master of none of
these.
Someday I hope to be able to say I at least understand the vb.net part.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: Thursday, August 18, 2005 10:55 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Smtp mail from vb.net
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook. I
found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document,
previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended
solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this
transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its
attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to
the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly
required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal
right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in
respect of such communication.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Fri Aug 19 02:31:17 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Fri, 19 Aug 2005 02:31:17 -0500
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <123701F54509D9119A4F00D0B747349016DDC6@main2.marlow.com>
Why not just use SMTP directly. Remind me tomorrow, and I'll send you the
VB code I wrote to actually communicate (and send email) through SMTP
commands (using winsocks)
Drew (I'm going to bed, otherwise I'd dig it up now...)
> -----Original Message-----
> From: John W. Colby [SMTP:jwcolby at colbyconsulting.com]
> Sent: Thursday, August 18, 2005 10:09 PM
> To: ebarro at afsweb.com; dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
> I am attempting to create a system that will take data from a database,
> export it into a text file, then send that file as an attachment to an
> email
> to an insurance company. Later I will need to get an FTP channel going to
> send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
> just have DotNet directly send the email.
>
> My home office is connected to the internet via the cable company. They
> do
> port 25 blocking, forcing me to send to their SMTP server (from here at my
> office). It was for that reason that I sent to mail.optonline.com, as
> that
> is the SMTP server address used by my Outlook (from my home office). I am
> actually in the process of switching to a new hosting company that will
> allow me to use an alternate port to transmit email. That will still
> require me to hit that company's SMTP server, but at least I can send from
> anywhere I may be working to the same SMTP address. As it currently
> stands,
> I have to constantly futz with the SMTP server address as I move my laptop
> from my home to my client to my sister-in-law etc. All three of those
> locations goes through a ISP that performs port 25 blocking.
>
> Anyway.....
>
> I am trying to set up email for my vb.net program. It would be nice if it
> just worked, from wherever I plopped it down. And, of course, I do not
> understand anything about email, SMTP servers, or even vb.net. I guess
> that
> would make me jack of all trades... ;-) Or at least master of none of
> these.
>
> Someday I hope to be able to say I at least understand the vb.net part.
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
> Sent: Thursday, August 18, 2005 10:55 PM
> To: dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
>
> If you are trying to send via mail.optonline.com and it resolves to one of
> your machines on the internal network it won't work. Try using localhost
> which resolves to 127.0.0.1 (assuming that the mail server is your local
> machine) or the internal IP of the smtp server.
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Thursday, August 18, 2005 6:58 PM
> To: VBA
> Subject: [dba-VB] Smtp mail from vb.net
>
> I'm trying to get .net to send email for me without going through Outlook.
> I
> found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box
> though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
>
>
> ----------------------------------------------------------------
> The information contained in this e-mail message and any file, document,
> previous e-mail message and/or attachment transmitted
> herewith is confidential and may be legally privileged. It is intended
> solely for the private use of the addressee and must not be
> disclosed to or used by anyone other than the addressee. If you receive
> this
> transmission by error, please immediately notify the
> sender by reply e-mail and destroy the original transmission and its
> attachments without reading or saving it in any manner. If you
> are not the intended recipient, or a person responsible for delivering it
> to
> the intended recipient, you are hereby notified that any
> disclosure, copying, distribution or use of any of the information
> contained
> in or attached to this transmission is STRICTLY
> PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
> free as information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message, which arise as a result of
> email transmission. Users and employees of the e-mail system are expressly
> required not to make defamatory statements and not
> to infringe or authorize any infringement of copyright or any other legal
> right by email communications. Any such communication is
> contrary to company policy. The company will not accept any liability in
> respect of such communication.
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
From sgsax at ksu.edu Fri Aug 19 10:13:55 2005
From: sgsax at ksu.edu (Seth Galitzer)
Date: Fri, 19 Aug 2005 10:13:55 -0500
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
References: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305F733.7030507@ksu.edu>
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through Outlook.
> I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University
From jwcolby at colbyconsulting.com Mon Aug 22 21:35:59 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 22:35:59 -0400
Subject: [dba-VB] Setting up SQL Server on a system
In-Reply-To: <4305F733.7030507@ksu.edu>
Message-ID: <000801c5a78b$68c94200$6c7aa8c0@ColbyM6805>
What is involved in setting up the lite version of SQL server that comes
with .net? Is it already there if the .net framework is there? If so, how
do you determine what the server is called when you install a project to
run?
I have a service that I created that has an installer "built in". I can
install the service relatively easily and it is running etc. Now I want
that service to start a VB.Net application that has a table in SQL server.
That is NOT critical (an mdb works just fine) but I want to learn how to use
the SQL Server instance that comes with .Net.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Seth Galitzer
Sent: Friday, August 19, 2005 11:14 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Smtp mail from vb.net
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through
> Outlook. I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing
> obvious happens, no exception thrown. No email is delivered to my
> mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws
> an error "system.web.httpexception - could not access cdo.message
> object".
>
> Any ideas? If not does anyopne have a drop in function for sending
> email that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Mon Aug 22 22:06:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 23:06:22 -0400
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 08:06:14 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 08:06:14 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 08:58:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 09:58:40 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Message-ID: <002801c5a7ea$c7485780$6c7aa8c0@ColbyM6805>
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 10:42:53 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 11:42:53 -0400
Subject: [dba-VB] VB.Net - Data reader class
Message-ID: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 11:35:19 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 11:35:19 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE13@main2.marlow.com>
Why fire a timer over and over, to check things. Look up SetWaitableTimer.
It's one of a few API's where you can set a 'fire and forget' timer. The OS
will just alert you when the time is reached for something to run.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Tuesday, August 23, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 13:41:51 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 14:41:51 -0400
Subject: [dba-VB] .net error codes
Message-ID: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From mikedorism at verizon.net Tue Aug 23 13:47:43 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:47:43 -0400
Subject: [dba-VB] .net error codes
In-Reply-To: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
Message-ID: <000201c5a813$266ba140$2e01a8c0@dorismanning>
I know what you mean. With VBA error codes, you could just trap the error
number and go from there. With .Net, you have to trap the type of
exception, and then the number/message of the exception.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 2:42 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] .net error codes
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From mikedorism at verizon.net Tue Aug 23 13:56:47 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:56:47 -0400
Subject: [dba-VB] VB.Net - Data reader class
In-Reply-To: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
Message-ID: <000301c5a814$6ad51950$2e01a8c0@dorismanning>
Hi John,
Your code looks really good. The only thing you are missing is checking the
status of the connection before opening or closing it.
As for your questions about the data reader...The connection and command
object have to be open in order for the data reader to work. I do not open
the connection or command until the data reader is needed so the flow you
have makes sense to me.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 11:43 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Data reader class
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From artful at rogers.com Tue Aug 23 15:49:28 2005
From: artful at rogers.com (Arthur Fuller)
Date: Tue, 23 Aug 2005 16:49:28 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
Message-ID: <200508232049.j7NKnUR31133@databaseadvisors.com>
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business.
To put it another way, everything you can blame on MS should be blamed on
MS. Set it up in the BE and DO NOT INTERFERE.
Not to say there are no reasons for services, but from what you have
described thus far, this is NOT one of them. Schedule the job at a frequency
you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going.
AF`s Rule 1: everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 15:56:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 16:56:03 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003c01c5a825$12c824d0$6c7aa8c0@ColbyM6805>
LOL, this is an MDB.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 16:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 17:32:05 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
OK< sorry, I just fired off that response.
This is a system that pulls data out of a set of related tables and massages
it into a text file. The end result is a fixed width report (at this
moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
DOZENS). This report will be sent to a client Insurance company where it
will be imported into a mainframe.
The "jobs" are reports that have to be sent. The same report may have to be
sent multiple places, attached to an email in one case, FTPed in another.
It is in fact also being sent to our own people (MY client, the call center)
in a CSV format. Related records from a DOZEN tables (or more) have to be
pulled, some have to be denormalized (placed in a temp table) then
everything linked back together. Once the data is in a "single record"
format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
format. Unfortunately the client keeps changing where the fields go in the
record, what the format looks like etc.
And yes, this is happening on a regular basis. The client (insurance
company) is moving their entire company to a new software package, they are
clueless as you might expect, and things move slowly. TWO years so far (and
counting). They have even flopped back and forth between Fixed width and
comma delimited (and back again). But... I design to allow me to just
change the table.
As a result, I have set it all up so that it is table driven. I have a
table of what they call their fields, what position in the "big string" each
field (start and stop bytes), the name of the field in MY application which
maps to the field in THEIR application, the format string that makes it look
like they want, whether the field MUST exist in order to even allow the
export to occur etc.
I read the format table out and in to a field def/supervisor class system.
Another class causes the data denormalization to occur, handles some details
like checking that offsets (dates) fall within specific windows, pulls the
data out of my query and hands it off to the field supervisor which hands
each data piece to the appropriate "field class" which formats the field per
the instructions in the format table and hands back the piece to the
supervisor which inserts it into the "big string" in the right place... OR
into a comma delimited "CSV" format string, and hands the finished formatted
"big string" off to the data logger which writes it out to a file on a disk
with a specific name and a specific location on the hard disk.
Once the entire file is written, the finished file is placed in a "job"
queue to be sent out to wherever it is going.
This process is an entire application, with (in Access) 11 classes and a
handful of modules. There is absolutely nothing trivial about doing this.
The upside is that as the client comes back and says "no, move this field to
here, left justify in the field instead of right, and oh, by the way it
should have 4 decimal digits after the decimal point instead of two", I can
just go into my definition table and make the appropriate changes, and the
new report pops out as they request. Furthermore the process is broken down
into "black boxes" that create the export data, logs the finished export
string, logs the fact that a given record was exported and what file on the
hard disk it was placed in, transmits the file to the correct place, logs
the fact that the specified file was transmitted. When I am finished I can
run a query to see if a claim record was sent, what file it is in and where
on the disk it resides, what day and time it was sent, what method and
address was used to send it etc. If a record fails at any step, an email is
sent to me and my "boss" at my client informing me that step X of the
process failed.
Doing that does NOT allow "setting it up in the BE and do not interfere".
This is NOT an FE in the classic sense, it is a report generator / logger /
sender application, which, just happens to be, in an FE (of its own). All
of this is working at this point but it is written in VBA / Access FE
container. I am looking at moving the entire thing to .Net, on my own dime,
as an exercise in learning VB.Net.
Now... For the piece about which I am asking, I am discussing the scheduler
part, what report is sent to whom, using what transmission method, at what
time of the day/night, including / excluding holidays / weekends / custom
schedule etc. The client wants it, and the client is willing to pay for it,
so the client gets it. I am just examining my options for moving JUST THIS
PIECE (since the whole thing is modular anyway) into VB.Net.
Does that make it a little clearer? ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 24 02:07:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 03:07:03 -0400
Subject: [dba-VB] Don't ya just love it when...
Message-ID: <004a01c5a87a$70fc3320$6c7aa8c0@ColbyM6805>
I found what looks to be a really cool RSS Feed extractor to pull rss data
into a database.
VB.Net http://www.vbdotnetheaven.com/Code/Aug2003/2147.asp
and C#.net. http://www.c-sharpcorner.com//Code/2002/Aug/RssFeedProject.asp
Of course it doesn't work in VB.net for a variety of reasons. The script
for building the SQL database just isn't to be found anywhere. Luckily I
went and found the C# version, whereupon in the zip file I found the SQL
script and ran it.
Next, it places the tables in the Master database. Sigh.
Next, it needs an XML config file configured and placed in the same
directory as the resulting EXE. Again, not in the VB version, but right
there in the C# zip. However I don't know how to configure it. The
contents looks like:
Obviously the connection string will need to be a SQL Server connection
string (which I have seen but can't just write) and the database (I assume)
needs to be "Master" (since that's where the tables were thrown by the
script)?
Can anyone work with me to see if this thing will actually work if I get
this last piece happening. I really want to pull the RSS feed for my
NetFlix orders and Queue into the database for posterity, particularly my
recent orders RSS.
RSS is cool, but if I can grab the data it will be even more cool.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 10:14:58 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:14:58 -0400
Subject: [dba-VB] RSS Feed database
Message-ID: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Do I have no takers helping me get this thing working? The end result will
be a system for logging an RSS feed into data tables for analysis or use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
----------------------------------------------------------------------------
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
----------------------------------------------------------------------------
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Wed Aug 24 10:24:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:24:49 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
Where is the Return statement?
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 10:31:25 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:31:25 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
I'm just shooting int the dark... How about parenths around the @ID int
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From fhtapia at gmail.com Wed Aug 24 10:41:02 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Wed, 24 Aug 2005 08:41:02 -0700
Subject: [dba-VB] RSS Feed database
In-Reply-To:
References:
Message-ID:
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will
> be a system for logging an RSS feed into data tables for analysis or
> use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table.
> I am logging in to the database. The issue at this point is that the SP
> that is supposed to return the rows in the database apparently doesn't.
>
> The SP looks like:
>
> ------------------------------------------------------------------------
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From jwcolby at colbyconsulting.com Wed Aug 24 10:52:36 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:52:36 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To:
Message-ID: <011c01c5a8c3$dbf235a0$6c7aa8c0@ColbyM6805>
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Connec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value = id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there, it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for some
reason the SP is not returning data. That is the first error encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 11:03:44 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 12:03:44 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
John,
Try opening the connection earlier in the code.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:53 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] RSS Feed database
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Co
nnec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value =
id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there,
it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I
get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for
some
reason the SP is not returning data. That is the first error
encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco
Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
>
------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 11:47:20 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 09:47:20 -0700
Subject: [dba-VB] RSS Feed database
References: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Message-ID: <430CA498.4080302@shaw.ca>
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept.
I just didn't feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html"
'objExplorer.Navigate "http://www.Viescas.com/"
'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/"
Do While (objExplorer.Busy)
Loop
Dim webtx As String
Dim strHTML As String
Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
"
objDocument.Writeln "
"
objDocument.Writeln strpassHTML
objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result will
>be a system for logging an RSS feed into data tables for analysis or use.
>Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource table.
>I am logging in to the database. The issue at this point is that the SP
>that is supposed to return the rows in the database apparently doesn't.
>
>The SP looks like:
>
>----------------------------------------------------------------------------
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>----------------------------------------------------------------------------
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 12:22:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 13:22:47 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To: <430CA498.4080302@shaw.ca>
Message-ID: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Marty,
My purpose isn't to see a web page but rather to actually parse the xml file
and grab the data into a table. Specifically I just got an account with
NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
more importantly to show what you have rented. I want to capture a database
of what I have rented so that I don't rent it again (or know that I am doing
so), but also to get a table with the url back to the movie description.
Thus I really do want to open the feed, read it in, and grab the specific
fields and write them into a table.
In fact I have managed to get around the SQL Server issue by using the class
I posted yesterday for opening a reader (in Access). Access it trivial to
get to and get the data into and out of so I just rewrote the first part to
use my little class.
As my momma used to say...
"There's more ways to kill a cat than choking him to death on butter"
Luckily the part that opens the RSS feed just works. I am now working on
replacing the write of the data back out to SQL server with code to use my
class - modified a bit.
I wish I knew more about SQL Server but I have to do what works and Access
works ATM.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: Wednesday, August 24, 2005 12:47 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept. I just didn't
feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
"My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
" objDocument.Writeln "
"
objDocument.Writeln strpassHTML objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result
>will be a system for logging an RSS feed into data tables for analysis
>or use. Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource
>table. I am logging in to the database. The issue at this point is
>that the SP that is supposed to return the rows in the database
>apparently doesn't.
>
>The SP looks like:
>
>-----------------------------------------------------------------------
>-----
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>---------------------------------------------------------------------------
-
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 14:34:26 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 12:34:26 -0700
Subject: [dba-VB] RSS Feed database
References: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Message-ID: <430CCBC2.4080300@shaw.ca>
Well you can do with a short subroutine to put rss xml in table , a lot
of debug statement
just to keep track of what I was doing. Uses XPath statement to grab
appropriate nodes from DOM.
'LoadXML "http://msdn.microsoft.com/rss.xml","Just Published"
'LoadXML "http://msdn.microsoft.com/webservices/rss.xml","Web Services"
'LoadXML "http://msdn.microsoft.com/vstudio/rss.xml","Visual Studio"
'LoadXML "http://msdn.microsoft.com/netframework/rss.xml","Net Framework"
'LoadXML "http://msdn.microsoft.com/vcsharp/rss.xml","VC Sharp"
'LoadXML "http://msdn.microsoft.com/visualc/rss.xml", "VisualC"
'LoadXML "http://msdn.microsoft.com/security/rss.xml", "Security"
'Loadxml "http://www.kbalertz.com/rss/acc.xml","accesskbalert"
Public Sub LoadXML(ByRef AdviserXML As String, strFeed As String)
'second parameter just provides a feed name field in general table
' On Error GoTo ErrorHandler
Const ACTION_NAME As String = "LoadXML"
Dim oDOMDocument As MSXML2.DOMDocument40
Dim oNodeList As IXMLDOMNodeList
Dim oAdviserDetailsNode As IXMLDOMNode
Dim oLowestLevelNode As IXMLDOMElement
Dim objXMLDOMNamedNodeMap As IXMLDOMNamedNodeMap
Dim sTempValue As String
Dim msFPTAdviserID As Object
'temporary database
Dim MyDb As Database
Dim MyRs As Recordset
Dim irec As Long
Dim strTitleLink As String
Set oDOMDocument = New MSXML2.DOMDocument40
oDOMDocument.async = False
oDOMDocument.validateOnParse = False 'very trusting
oDOMDocument.resolveExternals = False
oDOMDocument.preserveWhiteSpace = True
If Not oDOMDocument.Load(AdviserXML) Then
MsgBox Err.number & Err.Description
'Call Err.Raise(ERR_UNABLE_TO_LOAD_ADVISER_XML, ,
ERRDESC_UNABLE_TO_LOAD_ADVISER_XML)
Exit Sub
End If
Debug.Print "grabbed box"
Set oAdviserDetailsNode = oDOMDocument.documentElement
Set objXMLDOMNamedNodeMap = oAdviserDetailsNode.Attributes
'msFPTAdviserID = objXMLDOMNamedNodeMap.getNamedItem("title").nodeValue
Debug.Print "Set"
Debug.Print "msFPT"
Set oNodeList = oAdviserDetailsNode.selectNodes("//item/*")
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("RSSFeed")
irec = 0
MyRs.AddNew
For Each oLowestLevelNode In oNodeList
sTempValue = oLowestLevelNode.Text
' Debug.Print oLowestLevelNode.nodeName & "-" & vbCrLf &
oLowestLevelNode.Text
Select Case oLowestLevelNode.nodeName
Case "title"
Debug.Print sTempValue
MyRs!Title = sTempValue
strTitleLink = sTempValue
Case "PubDate"
Debug.Print sTempValue
MyRs!PubDate = sTempValue
Case "description"
Debug.Print sTempValue
MyRs!fdescription = sTempValue
Case "link"
Debug.Print sTempValue
'MyRs!link = sTempValue
'need # format for clickable link
MyRs!link = sTempValue & "#" & sTempValue & "#"
End Select
irec = irec + 1
If irec = 4 Then
'check if duplicate also check if " in string
Debug.Print DLookup("ID", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))
If IsNull(DLookup("Title", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))) Then
MyRs!feed = strFeed
MyRs.Update
End If
MyRs.AddNew
irec = 0
End If
Next
Set MyRs = Nothing
Set MyDb = Nothing
Set oDOMDocument = Nothing
Set oAdviserDetailsNode = Nothing
Set objXMLDOMNamedNodeMap = Nothing
Exit Sub
ErrorHandler:
' Call NewError.Raise(Err.Number, Err.Source, Err.Description,
'MODULE_NAME, ACTION_NAME, Erl)
End Sub
John W. Colby wrote:
>Marty,
>
>My purpose isn't to see a web page but rather to actually parse the xml file
>and grab the data into a table. Specifically I just got an account with
>NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
>more importantly to show what you have rented. I want to capture a database
>of what I have rented so that I don't rent it again (or know that I am doing
>so), but also to get a table with the url back to the movie description.
>
>Thus I really do want to open the feed, read it in, and grab the specific
>fields and write them into a table.
>
>In fact I have managed to get around the SQL Server issue by using the class
>I posted yesterday for opening a reader (in Access). Access it trivial to
>get to and get the data into and out of so I just rewrote the first part to
>use my little class.
>
>As my momma used to say...
>
>"There's more ways to kill a cat than choking him to death on butter"
>
>Luckily the part that opens the RSS feed just works. I am now working on
>replacing the write of the data back out to SQL server with code to use my
>class - modified a bit.
>
>I wish I knew more about SQL Server but I have to do what works and Access
>works ATM.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
>Sent: Wednesday, August 24, 2005 12:47 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] RSS Feed database
>
>
>I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
>feeds and placed in tables, just did it as a proof of concept. I just didn't
>feel like running it daily to keep it uptodate. never
>found a way tokeep it uptodate or if Ms had an archive.
>I did this a year ago maybe there is something now.
>
>Never fully fleshed it out. If you want a copy, I'll have to check it
>still works.
>
>I have also done things like this that can be done better now through
>RSS Viewers.
>' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
>displays in IE window
>'But it doesn't require much code.
>If you do use this,snaffle the xsl file off my website and use locally
>it will be quicker.
>Save the XSL in notepad with UTF-8 format.
>
>Sub BBCRSSFeed()
>Dim srcTree As Object
>Dim xsltTree As Object
>Dim strHTML As String
> Set srcTree = CreateObject("Msxml.DOMDocument")
> srcTree.async = False
> srcTree.Load
>("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
> 'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
> Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
> xsltTree.async = False
> 'this xsl transform file can also be loaded via a local disk file
> xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
>
> strHTML = srcTree.transformNode(xsltTree)
>
> Debug.Print strHTML
> ' Display transformed xml rss news feed in html via IE 6.0 window
> testIE (strHTML)
>
>End Sub
>Sub testIE(strpassHTML As String)
>'------------------
>
>Dim objExplorer As Object
>Dim objDocument As Object
>Dim strComputer As String
>
>Dim strReturn As String
>
>Set objExplorer = CreateObject("InternetExplorer.Application")
>
>objExplorer.Navigate "about:blank"
>objExplorer.Toolbar = 0
>objExplorer.StatusBar = 0
>objExplorer.Width = 800
>objExplorer.Height = 570
>objExplorer.Left = 0
>objExplorer.Top = 0
>objExplorer.Visible = 1
>'dont't need to navigate to file or http site like below
>'just drop html string created from xslt into the IE document object
>'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
>"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
>'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
>(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
>objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
>"My BBC Technology RSS
>Feed"
>'A little bit of CSS code to make it funky
>objDocument.Writeln " " { background-attachment: fixed; background-position: 97% bottom;
>" & _
> " background-image= 'url(logoBackGround.gif)';background-repeat:
>no-repeat;" & _
> " padding: 5px;font-family='Georgia';font-size: 80%;} >"
>
>objDocument.Writeln ""
>objDocument.Writeln ""
>objDocument.Writeln "BBC Feed | "
>objDocument.Writeln "
" objDocument.Writeln "
"
>objDocument.Writeln strpassHTML objDocument.Writeln ""
>'objDocument.Write()
>objDocument.Close
>'MsgBox "finished"
>Set objExplorer = Nothing
>Set objDocument = Nothing
>
>End Sub
>
>
>
>
>John W. Colby wrote:
>
>
>
>>Do I have no takers helping me get this thing working? The end result
>>will be a system for logging an RSS feed into data tables for analysis
>>or use. Could be niiiice. ;-)
>>
>>I have made good progress, I have a database set up in SQL Server
>>specifically for this project. I have the tables built per the script
>>included in the C# zip. There are two records in the WebNewsSource
>>table. I am logging in to the database. The issue at this point is
>>that the SP that is supposed to return the rows in the database
>>apparently doesn't.
>>
>>The SP looks like:
>>
>>-----------------------------------------------------------------------
>>-----
>>-----
>>-- Stored procedure that will select an existing row from the table
>>'WebNewsSource'
>>-- based on the Primary Key.
>>-- Gets: @ID int
>>---------------------------------------------------------------------------
>>
>>
>-
>
>
>>-----
>>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
>> @ID int
>>AS
>>SET NOCOUNT ON
>>-- SELECT an existing row from the table.
>>SELECT
>> [ID],
>> [Source],
>> [RSSURL],
>> [RSSSelect],
>> [RSSTitle],
>> [RSSLink],
>> [RSSDescription]
>>
>>
>>FROM [dbo].[WebNewsSource]
>
>
>>WHERE
>> [ID] = @ID
>>
>>
>>GO
>>
>>How do I go about just running the SP passing in an ID and viewing the
>>results?
>>
>>John W. Colby
>>www.ColbyConsulting.com
>>
>>Contribute your unused CPU cycles to a good cause:
>>http://folding.stanford.edu/
>>
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>>
>>
>>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 15:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 16:32:05 -0400
Subject: [dba-VB] VB.Net - Executing queries - Microsoft Access connection
Message-ID: <013e01c5a8ea$e41d3460$6c7aa8c0@ColbyM6805>
What object do I use to execute a query against an connection / table. I
have gotten down to the table level but it looks like that is used for
getting a table to bind to a structure. All I really need to do is execute
a SQL statement that I construct on-the-fly that appends a record in a
table.
Microsoft Access connection
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 18:10:39 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 19:10:39 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Message-ID: <014e01c5a901$0af384c0$6c7aa8c0@ColbyM6805>
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From word_diva at hotmail.com Thu Aug 25 11:43:53 2005
From: word_diva at hotmail.com (Nancy Lytle)
Date: Thu, 25 Aug 2005 12:43:53 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report generation
application
In-Reply-To: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
Message-ID:
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they are
>clueless as you might expect, and things move slowly. TWO years so far
>(and
>counting). They have even flopped back and forth between Fixed width and
>comma delimited (and back again). But... I design to allow me to just
>change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each
>field (start and stop bytes), the name of the field in MY application which
>maps to the field in THEIR application, the format string that makes it
>look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class system.
>Another class causes the data denormalization to occur, handles some
>details
>like checking that offsets (dates) fall within specific windows, pulls the
>data out of my query and hands it off to the field supervisor which hands
>each data piece to the appropriate "field class" which formats the field
>per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and a
>handful of modules. There is absolutely nothing trivial about doing this.
>The upside is that as the client comes back and says "no, move this field
>to
>here, left justify in the field instead of right, and oh, by the way it
>should have 4 decimal digits after the decimal point instead of two", I can
>just go into my definition table and make the appropriate changes, and the
>new report pops out as they request. Furthermore the process is broken
>down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not interfere".
>This is NOT an FE in the classic sense, it is a report generator / logger /
>sender application, which, just happens to be, in an FE (of its own). All
>of this is working at this point but it is written in VBA / Access FE
>container. I am looking at moving the entire thing to .Net, on my own
>dime,
>as an exercise in learning VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the scheduler
>part, what report is sent to whom, using what transmission method, at what
>time of the day/night, including / excluding holidays / weekends / custom
>schedule etc. The client wants it, and the client is willing to pay for
>it,
>so the client gets it. I am just examining my options for moving JUST THIS
>PIECE (since the whole thing is modular anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
From jwcolby at colbyconsulting.com Thu Aug 25 12:38:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 25 Aug 2005 13:38:02 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
In-Reply-To:
Message-ID: <01c801c5a99b$be5a2150$6c7aa8c0@ColbyM6805>
Nancy,
The system I use started with a spreadsheet of field definitions I was given
by the insurance company (AGI) who is my client's client. So they sent me
something in spreadsheet format that looked like:
AIGFldName StartPos EndPos FldLen Format And I added on from
there
SomeCurrFld 1 10 10 Cur
SomeTxtFld 11 16 6 text
SomeDteFld 17 24 8 Date
Etc
I took this information and pulled it into an Access table. I then added
MyFldName MyFormatStr Critical IsUsed
Etc
So I now have a single table where I have what their field is called, where
it is in the fixed width string, my matching field name, the format string I
need to use to get it into the format they want, whether it is critical
(don't send without it), whether I actually have any data (field) to go in
that field etc.
What I then did was to build a clsFld that took each FIELD DEFINITION (one
record from this table) and loaded all the data for that record into
variables in the class header. Each clsFld instance is then saved in a
collection in the supervisor of this class (clsRecord), with the KEY being
the field name in MY database. I designed my system such that there is a
clsExport class, a clsRecord, and a clsFld. The record class is
instantiated once, loads the clsFld class instances and stores them into a
collection in the record class.
A method of clsRecord is then called by clsExport (supervisor) class, passed
a single record each time it is called. The clsRecord processes each field
in the record it is passed - iterates the field collection using dao (could
be done id ADO though). Basically clsRecord iterates through the fields in
the record passed in, calls a method in the matching clsFld, passing the
data to clsFld. ClsFld formats the data with the format string (remember
everything is a string in the end), justifies it in the string of the
required length (remember the length field?) and hands back the string to
clsRecord. ClsRecord then inserts the formatted data into the "bigString"
beginning at StartPos. When clsRec has iterated all the clsFld instances in
the collection of clsFld, it is done with the record and has a "big string"
with data in specific places in "big string". clsRecord then hands that
string back to clsExport which is responsible for storing the "big string"
in a file out on disk. In fact clsExport sets up a clsLog when it opens,
with the path to the file to be created as well as the name - with date etc
in the name. clsLog is just called passing it "big String" and it logs the
string out on the disk file.
So... To summarize, clsExport instantiates clsRecord (one instance) which
loads as many instances of clsFld as are required to handle exactly and only
the fields in the FieldDef table that are marked "Active". Each clsFld
instance "knows how" to format data for one field. It knows the data type
coming in, the format string to get it in the desired format, the length of
the string that the formatted data is going in, whether it is left or right
justified etc.
ClsExport loads the recordset of data to be exported, calls clsRecord.Format
once for each record to export. clsRecord calls each clsFld.Format to get
each field's data formatted correctly, loads the formatted data into "big
string" and hands "big string" back to clsExport. clsExport hands BigString
off to clsLog which gets it into the file out on the disk.
One of the bigger issues I ran into was the "denormalized" data I had to
include. There are (for example) 1 to N "deductions" to be made from a
claim payment, and I had to get all such deductions out of a normalized
form, into a denormalized form, and then that denormalized data joined to my
main data record, and processed into the "Deduction1, Deduction2,
Deduction3..." fields in "big string". Thus I have an entire process that
looks at the deductions, the date windows that the deductions are valid
compared to the date window that the payments are for, and then flattens
them into a table. Obviously the client defined N fields for this data (20
it turns out) so I had to handle a maximum of 20 deductions and get them
flattened into a single deduction record to join back to the main claim
record being processed.
Obviously there is more, but that is the big picture and should be enough
for you to start thinking about how to do things using compartmentalized
code (classes). The format table is a nicety that allows me to make
modifications to the system quickly and easily as the client changes their
requirements.
In fact I am in the process of porting my system to VB.Net. This stuff is
just VB. It makes absolutely no use of Access' RAD or GUI stuff so there is
no reason it couldn't be done directly in VB or VB.Net. In fact Access is
less than robust in terms of its reliability as I have discovered with this
system. If I were you though I would think about doing yours in VB.Net
rather than VB6.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Nancy Lytle
Sent: Thursday, August 25, 2005 12:44 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have
>to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they
>are clueless as you might expect, and things move slowly. TWO years so
>far (and counting). They have even flopped back and forth between
>Fixed width and comma delimited (and back again). But... I design to
>allow me to just change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each field (start and stop bytes), the name of the field in MY
>application which maps to the field in THEIR application, the format
>string that makes it look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class
>system. Another class causes the data denormalization to occur, handles
>some details like checking that offsets (dates) fall within specific
>windows, pulls the data out of my query and hands it off to the field
>supervisor which hands each data piece to the appropriate "field class"
>which formats the field per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and
>a handful of modules. There is absolutely nothing trivial about doing
>this. The upside is that as the client comes back and says "no, move
>this field to here, left justify in the field instead of right, and oh,
>by the way it should have 4 decimal digits after the decimal point
>instead of two", I can just go into my definition table and make the
>appropriate changes, and the new report pops out as they request.
>Furthermore the process is broken down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not
>interfere". This is NOT an FE in the classic sense, it is a report
>generator / logger / sender application, which, just happens to be, in
>an FE (of its own). All of this is working at this point but it is
>written in VBA / Access FE container. I am looking at moving the
>entire thing to .Net, on my own dime, as an exercise in learning
>VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the
>scheduler part, what report is sent to whom, using what transmission
>method, at what time of the day/night, including / excluding holidays /
>weekends / custom schedule etc. The client wants it, and the client is
>willing to pay for it, so the client gets it. I am just examining my
>options for moving JUST THIS PIECE (since the whole thing is modular
>anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes
>from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Fri Aug 26 06:10:30 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 07:10:30 -0400
Subject: [dba-VB] DotNet passing by value
Message-ID: <021f01c5aa2e$c88d7b20$6c7aa8c0@ColbyM6805>
As you might be aware, VB.Net (and I assume the other .net languages as
well) pass all variables by value. But what does this mean, and is it true.
As you know, everything in .net is an object, even common variables such as
an integer or decimal etc. Passing by value (in other languages) means
placing a COPY of the variable (or object in this case) on the stack as the
function is called. In VBA for example, when you pass by value, it really
does ONLY for the simple data types, passing anything else (including
strings) by value.
Imagine passing a string, which could be a million bytes, by value -
literally making a copy and passing that into the stack. IIRC the total
stack space for a given program in an Intel machine is something like 128
kbytes which means that passing a single (huge) string by value could cause
a stack overflow. Now DotNet comes along claiming to pass everything by
value. Is this more doublespeak? And if so, what is the truth?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 07:38:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 08:38:40 -0400
Subject: [dba-VB] OT: FireFox not wrapping
Message-ID: <022401c5aa3b$19dacfd0$6c7aa8c0@ColbyM6805>
Does anyone know how to get firefox to wrap to the screen dimensions? I am
viewing MS pages which trail off to the side (have to use the slider) in FF
but wrap correctly in IE.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 08:15:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 09:15:02 -0400
Subject: [dba-VB] Passing null values to a function
Message-ID: <022701c5aa40$2dd57580$6c7aa8c0@ColbyM6805>
I have designed a class, with the New widget (constructor) having a set of
parameters, with the parameters type declared.
New(ByVal lintPKID As Int32, ByVal lstrForeignName As String, ByVal
lstrLocalName As String, _
ByVal lintLen As Int16, ByVal lintPosStart As Int16,
ByVal lintPosStop As Int16, _
ByVal lblnActive As Boolean, ByVal lblnCritical As
Boolean, _
ByVal lstrForeignDescr As String, ByVal lstrLocalDescr
As String, _
ByVal lstrFmt As String, ByVal lblnRightJustified As
Boolean, ByVal lstrNotes As String)
The problem I am running in to is that I am loading this stuff from a table.
I have a class that I initialize, which returns a data reader, and I take
the fields from the reader and pass the values in as follows:
Dim lclsData As clsData
Dim lDr As OleDbDataReader
lclsData = New clsData(lstrDataProvider, lstrDataSrc) 'Get an
instance of clsData
lclsData.pSQL = "SELECT * FROM " & lstrTblName & " WHERE ACTIVE =
True;" 'Set the SQL statement
If lclsData.mDrOpen() Then 'Open the reader
Dim lclsFld As clsFld 'dim a variable to hold clsFld instances
lDr = lclsData.pDR 'Get the data reader
While lDr.Read() 'Cycle through the field format records
'Loading the data from each field format record into the
clsFld instance
lclsFld = New clsFld(lDr("PKID"), lDr("ForeignFldName"),
lDr("LocalFldName"), _
lDr("Length"), lDr("PosStart"),
lDr("PosStop"), _
lDr("Active"), lDr("Critical"), _
lDr("ForeignDescr"),
lDr("LocalDescr"), _
lDr("Format"),
lDr("RightJustified"), lDr("Notes"))
The last line is pulling null values out of the "RightJustified" and "Notes"
fields and trying to pass them in. The program is throwing a runtime error
- "cast from type dbNull to type String not valid"
In this specific case I can go in and "fix" the source data but how do I
handle this if nulls are a valid possibility and I want them to be allowed
to be passed in? Do I need to change my parameter type to object (or
untyped)?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From bheid at appdevgrp.com Mon Aug 29 10:33:09 2005
From: bheid at appdevgrp.com (Bobby Heid)
Date: Mon, 29 Aug 2005 11:33:09 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
In-Reply-To: <916187228923D311A6FE00A0CC3FAA30C6DDF2@ADGSERVER>
Message-ID: <916187228923D311A6FE00A0CC3FAA30ABEEEA@ADGSERVER>
Cool! Thanks John.
Bobby
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 7:11 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
From fhtapia at gmail.com Mon Aug 29 13:25:16 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 11:25:16 -0700
Subject: [dba-VB] XML DOM to string?
Message-ID:
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Mon Aug 29 14:17:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Mon, 29 Aug 2005 15:17:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Francisco,
I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 2:25 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] XML DOM to string?
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Mon Aug 29 15:32:24 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 13:32:24 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID:
Well I need the XML formated in the way I metioned earlier, that's
because I then make a call to a soap object in which it calls a PICK
database (Unidata) to deliver an order. Originally I had a For XML
call from sql server but I was not able to take that result and stuff
it into a variable, so I did it in VB, I have a class that I use to
create the xml as previously listed, so I finished my document, but
wanted to simply make the soap call when I realized that this was an
object and not a string, thus it wasn't gonna work. My current
solution is to save it temporarily to the disk and re-read it back to
a string variable as a text file using LOF, it works fine, and on my
system is actually really quick, but it was just a bother.
On 8/29/05, Jim DeMarco wrote:
> Francisco,
>
> I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 2:25 PM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] XML DOM to string?
>
>
> I'm messing around w/ XML and it's quite late I suppose since there
> really is so much I do not know... what I'm trying to do, I have a
> class that I use to create a complex XML, that is:
>
> I can save my xmldom object down to a file, but then I'd have to
> re-open it and read it all back into a string, and I wondered since
> it's in memory if I can just somehow save it to a string instead...
> any clues?
> Thanks
>
>
> WSOrder>
> -
> FO440
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> -
> 93-1000
> 10
> 21222
>
> -
> 22-2222
> 5
> 50101
>
> -
> 33-3333
> 33
> 696969
>
>
>
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From martyconnelly at shaw.ca Mon Aug 29 17:37:33 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Mon, 29 Aug 2005 15:37:33 -0700
Subject: [dba-VB] XML DOM to string?
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID: <43138E2D.1060204@shaw.ca>
Why not grab the intial html string returned down the wire by the soap
call before you place it in the xmldom.
It would look something like this. Just strip off the envelope xml code
and use the soap body.
Assuming you are using xmlhttp it would be contained in
XMLHTTP.responseXML.xml
rather than XMLHTTP.responseText.
00000-0000
Francisco Tapia wrote:
>Well I need the XML formated in the way I metioned earlier, that's
>because I then make a call to a soap object in which it calls a PICK
>database (Unidata) to deliver an order. Originally I had a For XML
>call from sql server but I was not able to take that result and stuff
>it into a variable, so I did it in VB, I have a class that I use to
>create the xml as previously listed, so I finished my document, but
>wanted to simply make the soap call when I realized that this was an
>object and not a string, thus it wasn't gonna work. My current
>solution is to save it temporarily to the disk and re-read it back to
>a string variable as a text file using LOF, it works fine, and on my
>system is actually really quick, but it was just a bother.
>
>On 8/29/05, Jim DeMarco wrote:
>
>
>>Francisco,
>>
>>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>>
>>Jim DeMarco
>>
>>-----Original Message-----
>>From: dba-vb-bounces at databaseadvisors.com
>>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
>>Sent: Monday, August 29, 2005 2:25 PM
>>To: dba-vb at databaseadvisors.com
>>Subject: [dba-VB] XML DOM to string?
>>
>>
>>I'm messing around w/ XML and it's quite late I suppose since there
>>really is so much I do not know... what I'm trying to do, I have a
>>class that I use to create a complex XML, that is:
>>
>>I can save my xmldom object down to a file, but then I'd have to
>>re-open it and read it all back into a string, and I wondered since
>>it's in memory if I can just somehow save it to a string instead...
>>any clues?
>>Thanks
>>
>>
>>WSOrder>
>>-
>> FO440
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>-
>>-
>> 93-1000
>> 10
>> 21222
>>
>>-
>> 22-2222
>> 5
>> 50101
>>
>>-
>> 33-3333
>> 33
>> 696969
>>
>>
>>
>>
>>
>>--
>>-Francisco
>>http://pcthis.blogspot.com |PC news with out the jargon!
>>http://sqlthis.blogspot.com | Tsql and More...
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>***********************************************************************************
>>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
>>***********************************************************************************
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From fhtapia at gmail.com Mon Aug 29 22:38:25 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 20:38:25 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <43138E2D.1060204@shaw.ca>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
<43138E2D.1060204@shaw.ca>
Message-ID:
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 06:58:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 07:58:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Would using the FileSystemObject and opening a TextStream help at all?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 11:38 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Tue Aug 30 07:58:37 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Tue, 30 Aug 2005 05:58:37 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Message-ID:
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:33:54 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:33:54 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D2F@TTNEXCHCL2.hshhp.com>
Francisco,
Here's some VB 6 code that will return the XML without the need to write to a file.
HTH,
Jim DeMarco
=============================
Public Function MyXMLString() As String
Dim oXML As MSXML2.DOMDocument30
Dim oElement As IXMLDOMElement
Const FILE_NOT_FOUND_ERROR = 53
Set oXML = New DOMDocument30
oXML.async = False
'
If Len(Dir("c:\test.xml")) = 0 Then
Err.Raise FILE_NOT_FOUND_ERROR, "MyTest:MyXMLString", Err.Description
End If
oXML.Load "c:\test.xml"
If oXML.parseError.errorCode <> 0 Then
Err.Raise oXML.parseError.errorCode, "MyTest:MyXMLString", oXML.parseError.reason
End If
Set oElement = oXML.documentElement
MyXMLString = oElement.xml
End Function
Private Sub Form_Load()
Debug.Print MyXMLString
End Sub
=============================
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:35:22 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:35:22 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D30@TTNEXCHCL2.hshhp.com>
Sorry I should have mentioned that even though I opened a file to get the XML for the example I just posted you can do the same with a DOM object already loaded in memory.
Jim D.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From listmaster at databaseadvisors.com Wed Aug 31 08:21:41 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Wed, 31 Aug 2005 09:21:41 -0400
Subject: [dba-VB] Administrivia - List Software Upgrade - Sep 4
Message-ID: <431576A5.23677.326CD85@listmaster.databaseadvisors.com>
The software that runs our list has released a new version to fix
some security issues, add some new features to help out the admins
and mods and some bug fixes.
So I will be upgrading the software on Sunday Sep 4. This will mean
the lists will be down starting at 10am (EDT - UTC -0400) on Sunday
Set 4. If the previous upgrades are any indication, they will be down
for less than 1/2 hour. So there won't be much disruption.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
Failure is not an option. It comes bundled with the software.
From jwcolby at colbyconsulting.com Wed Aug 3 22:08:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:08:40 -0400
Subject: [dba-VB] Inheriting collections
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007b01c598a1$d0afdcb0$6c7aa8c0@ColbyM6805>
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 3 22:11:08 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:11:08 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
Has anyone seen anything indicating the relative speed between "identical
code" in these two languages? I went looking for a way to test .net code
and promptly got bogged down in issues like data collection distorting the
numbers etc. I'm just wondering if anyone has a feel for the relative
speeds? Similar, very different?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Wed Aug 3 22:21:33 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Thu, 04 Aug 2005 13:21:33 +1000
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
References: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between "identical
> code" in these two languages? I went looking for a way to test .net code
> and promptly got bogged down in issues like data collection distorting the
> numbers etc. I'm just wondering if anyone has a feel for the relative
> speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From jwcolby at colbyconsulting.com Wed Aug 3 22:41:18 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:41:18 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
Message-ID: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Yea I read that, but that is vb not vba.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, August 03, 2005 11:22 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Speed - vb.net vs vba
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between
> "identical code" in these two languages? I went looking for a way to
> test .net code and promptly got bogged down in issues like data
> collection distorting the numbers etc. I'm just wondering if anyone
> has a feel for the relative speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Thu Aug 4 01:09:50 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 03 Aug 2005 23:09:50 -0700
Subject: [dba-VB] Speed - vb.net vs vba
References: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Message-ID: <42F1B12E.4020904@shaw.ca>
Well I could show you how to write direct Intel Machine OpCode via DOS
copy con: c:\temp\myprog.exe
No assembler no nothing, but would you want to do it.
Most speed can be gained by proper algorithms at times compilers can be
irrelevant
http://www.xbeat.net/vbspeed/index.htm
John W. Colby wrote:
>Yea I read that, but that is vb not vba.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
>Sent: Wednesday, August 03, 2005 11:22 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] Speed - vb.net vs vba
>
>
>On 3 Aug 2005 at 23:11, John W. Colby wrote:
>
>
>
>>Has anyone seen anything indicating the relative speed between
>>"identical code" in these two languages? I went looking for a way to
>>test .net code and promptly got bogged down in issues like data
>>collection distorting the numbers etc. I'm just wondering if anyone
>>has a feel for the relative speeds? Similar, very different?
>>
>>
>>
>
>Try
>http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From Jdemarco at hudsonhealthplan.org Thu Aug 4 07:00:13 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Thu, 4 Aug 2005 08:00:13 -0400
Subject: [dba-VB] Inheriting collections
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
I was pretty busy at the time of your original post but a quick take would be that inheriting from a collection will help keep your syntax a bit cleaner:
objSysVarTbl.CollectionMethod
objSysVarTbl.CollectionObject.CollectionMethod
HTH
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Wednesday, August 03, 2005 11:09 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Inheriting collections
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From jwcolby at colbyconsulting.com Tue Aug 9 13:04:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 14:04:22 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
Message-ID: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Tue Aug 9 14:04:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Tue, 9 Aug 2005 15:04:49 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 16:17:41 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 17:17:41 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To:
Message-ID: <008601c59d27$c6b8c390$6c7aa8c0@ColbyM6805>
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 18:24:57 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 19:24:57 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
Message-ID: <008701c59d39$91847180$6c7aa8c0@ColbyM6805>
This is what I found for doing this:
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
>From this article:
http://www.dotnetbips.com/51AA8C48-7DD4-416B-A9D2-63C26644C120.aspx?articlei
d=28
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 10 06:10:42 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 10 Aug 2005 07:10:42 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
I'm not sure that you have to be logged in. But I am using it on Windows
2003 Server under the administrator account.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 5:18 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From listmaster at databaseadvisors.com Sun Aug 14 08:50:58 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Sun, 14 Aug 2005 09:50:58 -0400
Subject: [dba-VB] Administrivia - Lists Temporarily Down
Message-ID: <42FF1402.5531.150D8B@listmaster.databaseadvisors.com>
The company that hosts our lists will be doing some maintenance on
their network from 11PM Aug 16 to 6 AM Aug 17 CST (04:00 to 11:00 on
Aug 17 UTC - http://www.timezoneconverter.com/cgi-bin/tzc.tzc to find
out what time it is in your timezone))
They are upgrading their core routers, which will cause dba's list,
and associated web pages (not the Website, but the list pages,
including archives) to be down, anywhere from a few minutes to an
hour.
Hopefully this does not cause anyone too much of an inconvenience.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
If you can't be a good example, then you'll just have to be a
horrible warning.
From R.Griffiths at bury.gov.uk Tue Aug 16 10:46:56 2005
From: R.Griffiths at bury.gov.uk (Griffiths, Richard)
Date: Tue, 16 Aug 2005 16:46:56 +0100
Subject: [dba-VB] Update BE
Message-ID: <200508161536.j7GFan926891@smarthost.yourcomms.net>
Hi
After advice/resources.
I have written an application using vb.net which is to run with A2K BE
and SQL 2000 BE.
I am trying to think about how to update the back end. I have a number
of options, one being to write VB code and using DAO or ADO update the
BE. But I think this will involve further deployment of VB and Jet/Vba
and MS Access (runtime) etc.
The other option (no doubt there are others) is to write CREATE TABLE
and ALTER TABLE statements (and this can be deployed within a exe
running vb.net). I think this is tidier, however there is not much
documentation on this process ( CREATE TABLE and ALTER TABLE etc) for MS
Access. Does anyone have code and/or can offer good sources on the web
to help me here. Any other solutions?
Many thanks
Richard
From jwcolby at colbyconsulting.com Thu Aug 18 10:32:27 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:32:27 -0400
Subject: [dba-VB] Running an app from a service
Message-ID: <011101c5a40a$0d5a3110$6c7aa8c0@ColbyM6805>
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Thu Aug 18 10:37:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:37:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 10:59:14 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:59:14 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
Message-ID: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 10:58:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:58:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:11:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:11:28 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
Message-ID: <011901c5a40f$7d2e05c0$6c7aa8c0@ColbyM6805>
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
From DWUTKA at marlow.com Thu Aug 18 11:14:23 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 11:14:23 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
LOL. Jack of all trades, master of none! ;)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 11:11 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:38:24 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:38:24 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
Message-ID: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
I prefer to be Jack of all trades, master of one.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 12:14 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. Jack of all trades, master of none! ;)
Drew
From carbonnb at gmail.com Thu Aug 18 13:30:45 2005
From: carbonnb at gmail.com (Bryan Carbonnell)
Date: Thu, 18 Aug 2005 14:30:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
References: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
<011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
Message-ID:
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
From DWUTKA at marlow.com Thu Aug 18 13:33:11 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 13:33:11 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:01:12 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:01:12 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To:
Message-ID: <011f01c5a427$36fbab30$6c7aa8c0@ColbyM6805>
ROTFL. It changes year to year. And of course I get a LOT of arguments
whether I am even an apprentice at anything.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
Sent: Thursday, August 18, 2005 2:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:02:15 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:02:15 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Message-ID: <012001c5a427$5e1213d0$6c7aa8c0@ColbyM6805>
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:13:46 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:13:46 -0400
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Message-ID: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Thu Aug 18 14:21:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:21:28 -0400
Subject: [dba-VB] NSpring
Message-ID: <012401c5a42a$0bdcab40$6c7aa8c0@ColbyM6805>
Has anyone looked at / evaluated / used Nspring -
http://sourceforge.net/projects/nspring
I am in need of a good logger, and I use collections a LOT in my programming
so this also looks promising on that front. I understand that I can just
reference the project from my code so it should not matter too much that I
choose VB.Net and this stuff is in C#, correct?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From ridermark at gmail.com Thu Aug 18 14:26:17 2005
From: ridermark at gmail.com (Mark Rider)
Date: Thu, 18 Aug 2005 14:26:17 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
References: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
<012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Message-ID:
In the registry under HKCU\Software\Microsoft\VisualStudio\7.1 there
is a ProjectMRUList key and a FileMRUList key. Deleting the strings
in there will clear it all out.
May be a bit heavy handed, but that is the only way I have found to do it.
--
Mark Rider
http://commonsensesecurity.info
There are 10 kinds of people in the world:
Those who understand binary and those who don't.
From DWUTKA at marlow.com Thu Aug 18 17:25:42 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:25:42 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 17:26:12 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:26:12 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
Message-ID: <123701F54509D9119A4F00D0B747349016DDC3@main2.marlow.com>
I would guess it's in the registry.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:14 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Clearing the history list in .net IDE
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 17:58:45 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 18:58:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
Message-ID: <012701c5a448$6843edd0$6c7aa8c0@ColbyM6805>
Uh..no, psycho maybe.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 6:26 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 20:57:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 21:57:47 -0400
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Thu Aug 18 21:39:05 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Fri, 19 Aug 2005 12:39:05 +1000
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305D2E9.11360.31C0985@stuart.lexacorp.com.pg>
On 18 Aug 2005 at 21:57, John W. Colby wrote:
....
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
>
.....
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
Do you have an SMTP server running on your local machine?
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas?
Not really, but SMTP certainly shouldn't be going anywhere near anything
called ".web.http....."
If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
Try Blat.DLL from http://www.geocities.com/toby_korn/blat/
It's easy to use and I can talk you through it if you run into problems.
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From ebarro at afsweb.com Thu Aug 18 21:54:34 2005
From: ebarro at afsweb.com (Eric Barro)
Date: Thu, 18 Aug 2005 19:54:34 -0700
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID:
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document, previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in respect of such communication.
From jwcolby at colbyconsulting.com Thu Aug 18 22:08:35 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 23:08:35 -0400
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To:
Message-ID: <013101c5a46b$4cabf180$6c7aa8c0@ColbyM6805>
I am attempting to create a system that will take data from a database,
export it into a text file, then send that file as an attachment to an email
to an insurance company. Later I will need to get an FTP channel going to
send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
just have DotNet directly send the email.
My home office is connected to the internet via the cable company. They do
port 25 blocking, forcing me to send to their SMTP server (from here at my
office). It was for that reason that I sent to mail.optonline.com, as that
is the SMTP server address used by my Outlook (from my home office). I am
actually in the process of switching to a new hosting company that will
allow me to use an alternate port to transmit email. That will still
require me to hit that company's SMTP server, but at least I can send from
anywhere I may be working to the same SMTP address. As it currently stands,
I have to constantly futz with the SMTP server address as I move my laptop
from my home to my client to my sister-in-law etc. All three of those
locations goes through a ISP that performs port 25 blocking.
Anyway.....
I am trying to set up email for my vb.net program. It would be nice if it
just worked, from wherever I plopped it down. And, of course, I do not
understand anything about email, SMTP servers, or even vb.net. I guess that
would make me jack of all trades... ;-) Or at least master of none of
these.
Someday I hope to be able to say I at least understand the vb.net part.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: Thursday, August 18, 2005 10:55 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Smtp mail from vb.net
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook. I
found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document,
previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended
solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this
transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its
attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to
the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly
required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal
right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in
respect of such communication.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Fri Aug 19 02:31:17 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Fri, 19 Aug 2005 02:31:17 -0500
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <123701F54509D9119A4F00D0B747349016DDC6@main2.marlow.com>
Why not just use SMTP directly. Remind me tomorrow, and I'll send you the
VB code I wrote to actually communicate (and send email) through SMTP
commands (using winsocks)
Drew (I'm going to bed, otherwise I'd dig it up now...)
> -----Original Message-----
> From: John W. Colby [SMTP:jwcolby at colbyconsulting.com]
> Sent: Thursday, August 18, 2005 10:09 PM
> To: ebarro at afsweb.com; dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
> I am attempting to create a system that will take data from a database,
> export it into a text file, then send that file as an attachment to an
> email
> to an insurance company. Later I will need to get an FTP channel going to
> send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
> just have DotNet directly send the email.
>
> My home office is connected to the internet via the cable company. They
> do
> port 25 blocking, forcing me to send to their SMTP server (from here at my
> office). It was for that reason that I sent to mail.optonline.com, as
> that
> is the SMTP server address used by my Outlook (from my home office). I am
> actually in the process of switching to a new hosting company that will
> allow me to use an alternate port to transmit email. That will still
> require me to hit that company's SMTP server, but at least I can send from
> anywhere I may be working to the same SMTP address. As it currently
> stands,
> I have to constantly futz with the SMTP server address as I move my laptop
> from my home to my client to my sister-in-law etc. All three of those
> locations goes through a ISP that performs port 25 blocking.
>
> Anyway.....
>
> I am trying to set up email for my vb.net program. It would be nice if it
> just worked, from wherever I plopped it down. And, of course, I do not
> understand anything about email, SMTP servers, or even vb.net. I guess
> that
> would make me jack of all trades... ;-) Or at least master of none of
> these.
>
> Someday I hope to be able to say I at least understand the vb.net part.
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
> Sent: Thursday, August 18, 2005 10:55 PM
> To: dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
>
> If you are trying to send via mail.optonline.com and it resolves to one of
> your machines on the internal network it won't work. Try using localhost
> which resolves to 127.0.0.1 (assuming that the mail server is your local
> machine) or the internal IP of the smtp server.
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Thursday, August 18, 2005 6:58 PM
> To: VBA
> Subject: [dba-VB] Smtp mail from vb.net
>
> I'm trying to get .net to send email for me without going through Outlook.
> I
> found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box
> though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
>
>
> ----------------------------------------------------------------
> The information contained in this e-mail message and any file, document,
> previous e-mail message and/or attachment transmitted
> herewith is confidential and may be legally privileged. It is intended
> solely for the private use of the addressee and must not be
> disclosed to or used by anyone other than the addressee. If you receive
> this
> transmission by error, please immediately notify the
> sender by reply e-mail and destroy the original transmission and its
> attachments without reading or saving it in any manner. If you
> are not the intended recipient, or a person responsible for delivering it
> to
> the intended recipient, you are hereby notified that any
> disclosure, copying, distribution or use of any of the information
> contained
> in or attached to this transmission is STRICTLY
> PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
> free as information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message, which arise as a result of
> email transmission. Users and employees of the e-mail system are expressly
> required not to make defamatory statements and not
> to infringe or authorize any infringement of copyright or any other legal
> right by email communications. Any such communication is
> contrary to company policy. The company will not accept any liability in
> respect of such communication.
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
From sgsax at ksu.edu Fri Aug 19 10:13:55 2005
From: sgsax at ksu.edu (Seth Galitzer)
Date: Fri, 19 Aug 2005 10:13:55 -0500
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
References: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305F733.7030507@ksu.edu>
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through Outlook.
> I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University
From jwcolby at colbyconsulting.com Mon Aug 22 21:35:59 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 22:35:59 -0400
Subject: [dba-VB] Setting up SQL Server on a system
In-Reply-To: <4305F733.7030507@ksu.edu>
Message-ID: <000801c5a78b$68c94200$6c7aa8c0@ColbyM6805>
What is involved in setting up the lite version of SQL server that comes
with .net? Is it already there if the .net framework is there? If so, how
do you determine what the server is called when you install a project to
run?
I have a service that I created that has an installer "built in". I can
install the service relatively easily and it is running etc. Now I want
that service to start a VB.Net application that has a table in SQL server.
That is NOT critical (an mdb works just fine) but I want to learn how to use
the SQL Server instance that comes with .Net.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Seth Galitzer
Sent: Friday, August 19, 2005 11:14 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Smtp mail from vb.net
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through
> Outlook. I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing
> obvious happens, no exception thrown. No email is delivered to my
> mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws
> an error "system.web.httpexception - could not access cdo.message
> object".
>
> Any ideas? If not does anyopne have a drop in function for sending
> email that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Mon Aug 22 22:06:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 23:06:22 -0400
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 08:06:14 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 08:06:14 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 08:58:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 09:58:40 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Message-ID: <002801c5a7ea$c7485780$6c7aa8c0@ColbyM6805>
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 10:42:53 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 11:42:53 -0400
Subject: [dba-VB] VB.Net - Data reader class
Message-ID: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 11:35:19 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 11:35:19 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE13@main2.marlow.com>
Why fire a timer over and over, to check things. Look up SetWaitableTimer.
It's one of a few API's where you can set a 'fire and forget' timer. The OS
will just alert you when the time is reached for something to run.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Tuesday, August 23, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 13:41:51 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 14:41:51 -0400
Subject: [dba-VB] .net error codes
Message-ID: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From mikedorism at verizon.net Tue Aug 23 13:47:43 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:47:43 -0400
Subject: [dba-VB] .net error codes
In-Reply-To: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
Message-ID: <000201c5a813$266ba140$2e01a8c0@dorismanning>
I know what you mean. With VBA error codes, you could just trap the error
number and go from there. With .Net, you have to trap the type of
exception, and then the number/message of the exception.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 2:42 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] .net error codes
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From mikedorism at verizon.net Tue Aug 23 13:56:47 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:56:47 -0400
Subject: [dba-VB] VB.Net - Data reader class
In-Reply-To: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
Message-ID: <000301c5a814$6ad51950$2e01a8c0@dorismanning>
Hi John,
Your code looks really good. The only thing you are missing is checking the
status of the connection before opening or closing it.
As for your questions about the data reader...The connection and command
object have to be open in order for the data reader to work. I do not open
the connection or command until the data reader is needed so the flow you
have makes sense to me.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 11:43 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Data reader class
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From artful at rogers.com Tue Aug 23 15:49:28 2005
From: artful at rogers.com (Arthur Fuller)
Date: Tue, 23 Aug 2005 16:49:28 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
Message-ID: <200508232049.j7NKnUR31133@databaseadvisors.com>
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business.
To put it another way, everything you can blame on MS should be blamed on
MS. Set it up in the BE and DO NOT INTERFERE.
Not to say there are no reasons for services, but from what you have
described thus far, this is NOT one of them. Schedule the job at a frequency
you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going.
AF`s Rule 1: everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 15:56:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 16:56:03 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003c01c5a825$12c824d0$6c7aa8c0@ColbyM6805>
LOL, this is an MDB.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 16:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 17:32:05 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
OK< sorry, I just fired off that response.
This is a system that pulls data out of a set of related tables and massages
it into a text file. The end result is a fixed width report (at this
moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
DOZENS). This report will be sent to a client Insurance company where it
will be imported into a mainframe.
The "jobs" are reports that have to be sent. The same report may have to be
sent multiple places, attached to an email in one case, FTPed in another.
It is in fact also being sent to our own people (MY client, the call center)
in a CSV format. Related records from a DOZEN tables (or more) have to be
pulled, some have to be denormalized (placed in a temp table) then
everything linked back together. Once the data is in a "single record"
format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
format. Unfortunately the client keeps changing where the fields go in the
record, what the format looks like etc.
And yes, this is happening on a regular basis. The client (insurance
company) is moving their entire company to a new software package, they are
clueless as you might expect, and things move slowly. TWO years so far (and
counting). They have even flopped back and forth between Fixed width and
comma delimited (and back again). But... I design to allow me to just
change the table.
As a result, I have set it all up so that it is table driven. I have a
table of what they call their fields, what position in the "big string" each
field (start and stop bytes), the name of the field in MY application which
maps to the field in THEIR application, the format string that makes it look
like they want, whether the field MUST exist in order to even allow the
export to occur etc.
I read the format table out and in to a field def/supervisor class system.
Another class causes the data denormalization to occur, handles some details
like checking that offsets (dates) fall within specific windows, pulls the
data out of my query and hands it off to the field supervisor which hands
each data piece to the appropriate "field class" which formats the field per
the instructions in the format table and hands back the piece to the
supervisor which inserts it into the "big string" in the right place... OR
into a comma delimited "CSV" format string, and hands the finished formatted
"big string" off to the data logger which writes it out to a file on a disk
with a specific name and a specific location on the hard disk.
Once the entire file is written, the finished file is placed in a "job"
queue to be sent out to wherever it is going.
This process is an entire application, with (in Access) 11 classes and a
handful of modules. There is absolutely nothing trivial about doing this.
The upside is that as the client comes back and says "no, move this field to
here, left justify in the field instead of right, and oh, by the way it
should have 4 decimal digits after the decimal point instead of two", I can
just go into my definition table and make the appropriate changes, and the
new report pops out as they request. Furthermore the process is broken down
into "black boxes" that create the export data, logs the finished export
string, logs the fact that a given record was exported and what file on the
hard disk it was placed in, transmits the file to the correct place, logs
the fact that the specified file was transmitted. When I am finished I can
run a query to see if a claim record was sent, what file it is in and where
on the disk it resides, what day and time it was sent, what method and
address was used to send it etc. If a record fails at any step, an email is
sent to me and my "boss" at my client informing me that step X of the
process failed.
Doing that does NOT allow "setting it up in the BE and do not interfere".
This is NOT an FE in the classic sense, it is a report generator / logger /
sender application, which, just happens to be, in an FE (of its own). All
of this is working at this point but it is written in VBA / Access FE
container. I am looking at moving the entire thing to .Net, on my own dime,
as an exercise in learning VB.Net.
Now... For the piece about which I am asking, I am discussing the scheduler
part, what report is sent to whom, using what transmission method, at what
time of the day/night, including / excluding holidays / weekends / custom
schedule etc. The client wants it, and the client is willing to pay for it,
so the client gets it. I am just examining my options for moving JUST THIS
PIECE (since the whole thing is modular anyway) into VB.Net.
Does that make it a little clearer? ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 24 02:07:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 03:07:03 -0400
Subject: [dba-VB] Don't ya just love it when...
Message-ID: <004a01c5a87a$70fc3320$6c7aa8c0@ColbyM6805>
I found what looks to be a really cool RSS Feed extractor to pull rss data
into a database.
VB.Net http://www.vbdotnetheaven.com/Code/Aug2003/2147.asp
and C#.net. http://www.c-sharpcorner.com//Code/2002/Aug/RssFeedProject.asp
Of course it doesn't work in VB.net for a variety of reasons. The script
for building the SQL database just isn't to be found anywhere. Luckily I
went and found the C# version, whereupon in the zip file I found the SQL
script and ran it.
Next, it places the tables in the Master database. Sigh.
Next, it needs an XML config file configured and placed in the same
directory as the resulting EXE. Again, not in the VB version, but right
there in the C# zip. However I don't know how to configure it. The
contents looks like:
Obviously the connection string will need to be a SQL Server connection
string (which I have seen but can't just write) and the database (I assume)
needs to be "Master" (since that's where the tables were thrown by the
script)?
Can anyone work with me to see if this thing will actually work if I get
this last piece happening. I really want to pull the RSS feed for my
NetFlix orders and Queue into the database for posterity, particularly my
recent orders RSS.
RSS is cool, but if I can grab the data it will be even more cool.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 10:14:58 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:14:58 -0400
Subject: [dba-VB] RSS Feed database
Message-ID: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Do I have no takers helping me get this thing working? The end result will
be a system for logging an RSS feed into data tables for analysis or use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
----------------------------------------------------------------------------
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
----------------------------------------------------------------------------
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Wed Aug 24 10:24:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:24:49 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
Where is the Return statement?
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 10:31:25 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:31:25 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
I'm just shooting int the dark... How about parenths around the @ID int
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From fhtapia at gmail.com Wed Aug 24 10:41:02 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Wed, 24 Aug 2005 08:41:02 -0700
Subject: [dba-VB] RSS Feed database
In-Reply-To:
References:
Message-ID:
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will
> be a system for logging an RSS feed into data tables for analysis or
> use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table.
> I am logging in to the database. The issue at this point is that the SP
> that is supposed to return the rows in the database apparently doesn't.
>
> The SP looks like:
>
> ------------------------------------------------------------------------
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From jwcolby at colbyconsulting.com Wed Aug 24 10:52:36 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:52:36 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To:
Message-ID: <011c01c5a8c3$dbf235a0$6c7aa8c0@ColbyM6805>
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Connec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value = id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there, it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for some
reason the SP is not returning data. That is the first error encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 11:03:44 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 12:03:44 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
John,
Try opening the connection earlier in the code.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:53 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] RSS Feed database
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Co
nnec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value =
id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there,
it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I
get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for
some
reason the SP is not returning data. That is the first error
encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco
Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
>
------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 11:47:20 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 09:47:20 -0700
Subject: [dba-VB] RSS Feed database
References: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Message-ID: <430CA498.4080302@shaw.ca>
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept.
I just didn't feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html"
'objExplorer.Navigate "http://www.Viescas.com/"
'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/"
Do While (objExplorer.Busy)
Loop
Dim webtx As String
Dim strHTML As String
Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
"
objDocument.Writeln "
"
objDocument.Writeln strpassHTML
objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result will
>be a system for logging an RSS feed into data tables for analysis or use.
>Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource table.
>I am logging in to the database. The issue at this point is that the SP
>that is supposed to return the rows in the database apparently doesn't.
>
>The SP looks like:
>
>----------------------------------------------------------------------------
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>----------------------------------------------------------------------------
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 12:22:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 13:22:47 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To: <430CA498.4080302@shaw.ca>
Message-ID: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Marty,
My purpose isn't to see a web page but rather to actually parse the xml file
and grab the data into a table. Specifically I just got an account with
NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
more importantly to show what you have rented. I want to capture a database
of what I have rented so that I don't rent it again (or know that I am doing
so), but also to get a table with the url back to the movie description.
Thus I really do want to open the feed, read it in, and grab the specific
fields and write them into a table.
In fact I have managed to get around the SQL Server issue by using the class
I posted yesterday for opening a reader (in Access). Access it trivial to
get to and get the data into and out of so I just rewrote the first part to
use my little class.
As my momma used to say...
"There's more ways to kill a cat than choking him to death on butter"
Luckily the part that opens the RSS feed just works. I am now working on
replacing the write of the data back out to SQL server with code to use my
class - modified a bit.
I wish I knew more about SQL Server but I have to do what works and Access
works ATM.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: Wednesday, August 24, 2005 12:47 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept. I just didn't
feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
"My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
" objDocument.Writeln "
"
objDocument.Writeln strpassHTML objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result
>will be a system for logging an RSS feed into data tables for analysis
>or use. Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource
>table. I am logging in to the database. The issue at this point is
>that the SP that is supposed to return the rows in the database
>apparently doesn't.
>
>The SP looks like:
>
>-----------------------------------------------------------------------
>-----
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>---------------------------------------------------------------------------
-
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 14:34:26 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 12:34:26 -0700
Subject: [dba-VB] RSS Feed database
References: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Message-ID: <430CCBC2.4080300@shaw.ca>
Well you can do with a short subroutine to put rss xml in table , a lot
of debug statement
just to keep track of what I was doing. Uses XPath statement to grab
appropriate nodes from DOM.
'LoadXML "http://msdn.microsoft.com/rss.xml","Just Published"
'LoadXML "http://msdn.microsoft.com/webservices/rss.xml","Web Services"
'LoadXML "http://msdn.microsoft.com/vstudio/rss.xml","Visual Studio"
'LoadXML "http://msdn.microsoft.com/netframework/rss.xml","Net Framework"
'LoadXML "http://msdn.microsoft.com/vcsharp/rss.xml","VC Sharp"
'LoadXML "http://msdn.microsoft.com/visualc/rss.xml", "VisualC"
'LoadXML "http://msdn.microsoft.com/security/rss.xml", "Security"
'Loadxml "http://www.kbalertz.com/rss/acc.xml","accesskbalert"
Public Sub LoadXML(ByRef AdviserXML As String, strFeed As String)
'second parameter just provides a feed name field in general table
' On Error GoTo ErrorHandler
Const ACTION_NAME As String = "LoadXML"
Dim oDOMDocument As MSXML2.DOMDocument40
Dim oNodeList As IXMLDOMNodeList
Dim oAdviserDetailsNode As IXMLDOMNode
Dim oLowestLevelNode As IXMLDOMElement
Dim objXMLDOMNamedNodeMap As IXMLDOMNamedNodeMap
Dim sTempValue As String
Dim msFPTAdviserID As Object
'temporary database
Dim MyDb As Database
Dim MyRs As Recordset
Dim irec As Long
Dim strTitleLink As String
Set oDOMDocument = New MSXML2.DOMDocument40
oDOMDocument.async = False
oDOMDocument.validateOnParse = False 'very trusting
oDOMDocument.resolveExternals = False
oDOMDocument.preserveWhiteSpace = True
If Not oDOMDocument.Load(AdviserXML) Then
MsgBox Err.number & Err.Description
'Call Err.Raise(ERR_UNABLE_TO_LOAD_ADVISER_XML, ,
ERRDESC_UNABLE_TO_LOAD_ADVISER_XML)
Exit Sub
End If
Debug.Print "grabbed box"
Set oAdviserDetailsNode = oDOMDocument.documentElement
Set objXMLDOMNamedNodeMap = oAdviserDetailsNode.Attributes
'msFPTAdviserID = objXMLDOMNamedNodeMap.getNamedItem("title").nodeValue
Debug.Print "Set"
Debug.Print "msFPT"
Set oNodeList = oAdviserDetailsNode.selectNodes("//item/*")
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("RSSFeed")
irec = 0
MyRs.AddNew
For Each oLowestLevelNode In oNodeList
sTempValue = oLowestLevelNode.Text
' Debug.Print oLowestLevelNode.nodeName & "-" & vbCrLf &
oLowestLevelNode.Text
Select Case oLowestLevelNode.nodeName
Case "title"
Debug.Print sTempValue
MyRs!Title = sTempValue
strTitleLink = sTempValue
Case "PubDate"
Debug.Print sTempValue
MyRs!PubDate = sTempValue
Case "description"
Debug.Print sTempValue
MyRs!fdescription = sTempValue
Case "link"
Debug.Print sTempValue
'MyRs!link = sTempValue
'need # format for clickable link
MyRs!link = sTempValue & "#" & sTempValue & "#"
End Select
irec = irec + 1
If irec = 4 Then
'check if duplicate also check if " in string
Debug.Print DLookup("ID", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))
If IsNull(DLookup("Title", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))) Then
MyRs!feed = strFeed
MyRs.Update
End If
MyRs.AddNew
irec = 0
End If
Next
Set MyRs = Nothing
Set MyDb = Nothing
Set oDOMDocument = Nothing
Set oAdviserDetailsNode = Nothing
Set objXMLDOMNamedNodeMap = Nothing
Exit Sub
ErrorHandler:
' Call NewError.Raise(Err.Number, Err.Source, Err.Description,
'MODULE_NAME, ACTION_NAME, Erl)
End Sub
John W. Colby wrote:
>Marty,
>
>My purpose isn't to see a web page but rather to actually parse the xml file
>and grab the data into a table. Specifically I just got an account with
>NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
>more importantly to show what you have rented. I want to capture a database
>of what I have rented so that I don't rent it again (or know that I am doing
>so), but also to get a table with the url back to the movie description.
>
>Thus I really do want to open the feed, read it in, and grab the specific
>fields and write them into a table.
>
>In fact I have managed to get around the SQL Server issue by using the class
>I posted yesterday for opening a reader (in Access). Access it trivial to
>get to and get the data into and out of so I just rewrote the first part to
>use my little class.
>
>As my momma used to say...
>
>"There's more ways to kill a cat than choking him to death on butter"
>
>Luckily the part that opens the RSS feed just works. I am now working on
>replacing the write of the data back out to SQL server with code to use my
>class - modified a bit.
>
>I wish I knew more about SQL Server but I have to do what works and Access
>works ATM.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
>Sent: Wednesday, August 24, 2005 12:47 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] RSS Feed database
>
>
>I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
>feeds and placed in tables, just did it as a proof of concept. I just didn't
>feel like running it daily to keep it uptodate. never
>found a way tokeep it uptodate or if Ms had an archive.
>I did this a year ago maybe there is something now.
>
>Never fully fleshed it out. If you want a copy, I'll have to check it
>still works.
>
>I have also done things like this that can be done better now through
>RSS Viewers.
>' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
>displays in IE window
>'But it doesn't require much code.
>If you do use this,snaffle the xsl file off my website and use locally
>it will be quicker.
>Save the XSL in notepad with UTF-8 format.
>
>Sub BBCRSSFeed()
>Dim srcTree As Object
>Dim xsltTree As Object
>Dim strHTML As String
> Set srcTree = CreateObject("Msxml.DOMDocument")
> srcTree.async = False
> srcTree.Load
>("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
> 'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
> Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
> xsltTree.async = False
> 'this xsl transform file can also be loaded via a local disk file
> xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
>
> strHTML = srcTree.transformNode(xsltTree)
>
> Debug.Print strHTML
> ' Display transformed xml rss news feed in html via IE 6.0 window
> testIE (strHTML)
>
>End Sub
>Sub testIE(strpassHTML As String)
>'------------------
>
>Dim objExplorer As Object
>Dim objDocument As Object
>Dim strComputer As String
>
>Dim strReturn As String
>
>Set objExplorer = CreateObject("InternetExplorer.Application")
>
>objExplorer.Navigate "about:blank"
>objExplorer.Toolbar = 0
>objExplorer.StatusBar = 0
>objExplorer.Width = 800
>objExplorer.Height = 570
>objExplorer.Left = 0
>objExplorer.Top = 0
>objExplorer.Visible = 1
>'dont't need to navigate to file or http site like below
>'just drop html string created from xslt into the IE document object
>'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
>"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
>'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
>(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
>objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
>"My BBC Technology RSS
>Feed"
>'A little bit of CSS code to make it funky
>objDocument.Writeln " " { background-attachment: fixed; background-position: 97% bottom;
>" & _
> " background-image= 'url(logoBackGround.gif)';background-repeat:
>no-repeat;" & _
> " padding: 5px;font-family='Georgia';font-size: 80%;} >"
>
>objDocument.Writeln ""
>objDocument.Writeln ""
>objDocument.Writeln "BBC Feed | "
>objDocument.Writeln "
" objDocument.Writeln "
"
>objDocument.Writeln strpassHTML objDocument.Writeln ""
>'objDocument.Write()
>objDocument.Close
>'MsgBox "finished"
>Set objExplorer = Nothing
>Set objDocument = Nothing
>
>End Sub
>
>
>
>
>John W. Colby wrote:
>
>
>
>>Do I have no takers helping me get this thing working? The end result
>>will be a system for logging an RSS feed into data tables for analysis
>>or use. Could be niiiice. ;-)
>>
>>I have made good progress, I have a database set up in SQL Server
>>specifically for this project. I have the tables built per the script
>>included in the C# zip. There are two records in the WebNewsSource
>>table. I am logging in to the database. The issue at this point is
>>that the SP that is supposed to return the rows in the database
>>apparently doesn't.
>>
>>The SP looks like:
>>
>>-----------------------------------------------------------------------
>>-----
>>-----
>>-- Stored procedure that will select an existing row from the table
>>'WebNewsSource'
>>-- based on the Primary Key.
>>-- Gets: @ID int
>>---------------------------------------------------------------------------
>>
>>
>-
>
>
>>-----
>>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
>> @ID int
>>AS
>>SET NOCOUNT ON
>>-- SELECT an existing row from the table.
>>SELECT
>> [ID],
>> [Source],
>> [RSSURL],
>> [RSSSelect],
>> [RSSTitle],
>> [RSSLink],
>> [RSSDescription]
>>
>>
>>FROM [dbo].[WebNewsSource]
>
>
>>WHERE
>> [ID] = @ID
>>
>>
>>GO
>>
>>How do I go about just running the SP passing in an ID and viewing the
>>results?
>>
>>John W. Colby
>>www.ColbyConsulting.com
>>
>>Contribute your unused CPU cycles to a good cause:
>>http://folding.stanford.edu/
>>
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>>
>>
>>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 15:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 16:32:05 -0400
Subject: [dba-VB] VB.Net - Executing queries - Microsoft Access connection
Message-ID: <013e01c5a8ea$e41d3460$6c7aa8c0@ColbyM6805>
What object do I use to execute a query against an connection / table. I
have gotten down to the table level but it looks like that is used for
getting a table to bind to a structure. All I really need to do is execute
a SQL statement that I construct on-the-fly that appends a record in a
table.
Microsoft Access connection
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 18:10:39 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 19:10:39 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Message-ID: <014e01c5a901$0af384c0$6c7aa8c0@ColbyM6805>
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From word_diva at hotmail.com Thu Aug 25 11:43:53 2005
From: word_diva at hotmail.com (Nancy Lytle)
Date: Thu, 25 Aug 2005 12:43:53 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report generation
application
In-Reply-To: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
Message-ID:
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they are
>clueless as you might expect, and things move slowly. TWO years so far
>(and
>counting). They have even flopped back and forth between Fixed width and
>comma delimited (and back again). But... I design to allow me to just
>change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each
>field (start and stop bytes), the name of the field in MY application which
>maps to the field in THEIR application, the format string that makes it
>look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class system.
>Another class causes the data denormalization to occur, handles some
>details
>like checking that offsets (dates) fall within specific windows, pulls the
>data out of my query and hands it off to the field supervisor which hands
>each data piece to the appropriate "field class" which formats the field
>per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and a
>handful of modules. There is absolutely nothing trivial about doing this.
>The upside is that as the client comes back and says "no, move this field
>to
>here, left justify in the field instead of right, and oh, by the way it
>should have 4 decimal digits after the decimal point instead of two", I can
>just go into my definition table and make the appropriate changes, and the
>new report pops out as they request. Furthermore the process is broken
>down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not interfere".
>This is NOT an FE in the classic sense, it is a report generator / logger /
>sender application, which, just happens to be, in an FE (of its own). All
>of this is working at this point but it is written in VBA / Access FE
>container. I am looking at moving the entire thing to .Net, on my own
>dime,
>as an exercise in learning VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the scheduler
>part, what report is sent to whom, using what transmission method, at what
>time of the day/night, including / excluding holidays / weekends / custom
>schedule etc. The client wants it, and the client is willing to pay for
>it,
>so the client gets it. I am just examining my options for moving JUST THIS
>PIECE (since the whole thing is modular anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
From jwcolby at colbyconsulting.com Thu Aug 25 12:38:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 25 Aug 2005 13:38:02 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
In-Reply-To:
Message-ID: <01c801c5a99b$be5a2150$6c7aa8c0@ColbyM6805>
Nancy,
The system I use started with a spreadsheet of field definitions I was given
by the insurance company (AGI) who is my client's client. So they sent me
something in spreadsheet format that looked like:
AIGFldName StartPos EndPos FldLen Format And I added on from
there
SomeCurrFld 1 10 10 Cur
SomeTxtFld 11 16 6 text
SomeDteFld 17 24 8 Date
Etc
I took this information and pulled it into an Access table. I then added
MyFldName MyFormatStr Critical IsUsed
Etc
So I now have a single table where I have what their field is called, where
it is in the fixed width string, my matching field name, the format string I
need to use to get it into the format they want, whether it is critical
(don't send without it), whether I actually have any data (field) to go in
that field etc.
What I then did was to build a clsFld that took each FIELD DEFINITION (one
record from this table) and loaded all the data for that record into
variables in the class header. Each clsFld instance is then saved in a
collection in the supervisor of this class (clsRecord), with the KEY being
the field name in MY database. I designed my system such that there is a
clsExport class, a clsRecord, and a clsFld. The record class is
instantiated once, loads the clsFld class instances and stores them into a
collection in the record class.
A method of clsRecord is then called by clsExport (supervisor) class, passed
a single record each time it is called. The clsRecord processes each field
in the record it is passed - iterates the field collection using dao (could
be done id ADO though). Basically clsRecord iterates through the fields in
the record passed in, calls a method in the matching clsFld, passing the
data to clsFld. ClsFld formats the data with the format string (remember
everything is a string in the end), justifies it in the string of the
required length (remember the length field?) and hands back the string to
clsRecord. ClsRecord then inserts the formatted data into the "bigString"
beginning at StartPos. When clsRec has iterated all the clsFld instances in
the collection of clsFld, it is done with the record and has a "big string"
with data in specific places in "big string". clsRecord then hands that
string back to clsExport which is responsible for storing the "big string"
in a file out on disk. In fact clsExport sets up a clsLog when it opens,
with the path to the file to be created as well as the name - with date etc
in the name. clsLog is just called passing it "big String" and it logs the
string out on the disk file.
So... To summarize, clsExport instantiates clsRecord (one instance) which
loads as many instances of clsFld as are required to handle exactly and only
the fields in the FieldDef table that are marked "Active". Each clsFld
instance "knows how" to format data for one field. It knows the data type
coming in, the format string to get it in the desired format, the length of
the string that the formatted data is going in, whether it is left or right
justified etc.
ClsExport loads the recordset of data to be exported, calls clsRecord.Format
once for each record to export. clsRecord calls each clsFld.Format to get
each field's data formatted correctly, loads the formatted data into "big
string" and hands "big string" back to clsExport. clsExport hands BigString
off to clsLog which gets it into the file out on the disk.
One of the bigger issues I ran into was the "denormalized" data I had to
include. There are (for example) 1 to N "deductions" to be made from a
claim payment, and I had to get all such deductions out of a normalized
form, into a denormalized form, and then that denormalized data joined to my
main data record, and processed into the "Deduction1, Deduction2,
Deduction3..." fields in "big string". Thus I have an entire process that
looks at the deductions, the date windows that the deductions are valid
compared to the date window that the payments are for, and then flattens
them into a table. Obviously the client defined N fields for this data (20
it turns out) so I had to handle a maximum of 20 deductions and get them
flattened into a single deduction record to join back to the main claim
record being processed.
Obviously there is more, but that is the big picture and should be enough
for you to start thinking about how to do things using compartmentalized
code (classes). The format table is a nicety that allows me to make
modifications to the system quickly and easily as the client changes their
requirements.
In fact I am in the process of porting my system to VB.Net. This stuff is
just VB. It makes absolutely no use of Access' RAD or GUI stuff so there is
no reason it couldn't be done directly in VB or VB.Net. In fact Access is
less than robust in terms of its reliability as I have discovered with this
system. If I were you though I would think about doing yours in VB.Net
rather than VB6.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Nancy Lytle
Sent: Thursday, August 25, 2005 12:44 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have
>to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they
>are clueless as you might expect, and things move slowly. TWO years so
>far (and counting). They have even flopped back and forth between
>Fixed width and comma delimited (and back again). But... I design to
>allow me to just change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each field (start and stop bytes), the name of the field in MY
>application which maps to the field in THEIR application, the format
>string that makes it look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class
>system. Another class causes the data denormalization to occur, handles
>some details like checking that offsets (dates) fall within specific
>windows, pulls the data out of my query and hands it off to the field
>supervisor which hands each data piece to the appropriate "field class"
>which formats the field per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and
>a handful of modules. There is absolutely nothing trivial about doing
>this. The upside is that as the client comes back and says "no, move
>this field to here, left justify in the field instead of right, and oh,
>by the way it should have 4 decimal digits after the decimal point
>instead of two", I can just go into my definition table and make the
>appropriate changes, and the new report pops out as they request.
>Furthermore the process is broken down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not
>interfere". This is NOT an FE in the classic sense, it is a report
>generator / logger / sender application, which, just happens to be, in
>an FE (of its own). All of this is working at this point but it is
>written in VBA / Access FE container. I am looking at moving the
>entire thing to .Net, on my own dime, as an exercise in learning
>VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the
>scheduler part, what report is sent to whom, using what transmission
>method, at what time of the day/night, including / excluding holidays /
>weekends / custom schedule etc. The client wants it, and the client is
>willing to pay for it, so the client gets it. I am just examining my
>options for moving JUST THIS PIECE (since the whole thing is modular
>anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes
>from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Fri Aug 26 06:10:30 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 07:10:30 -0400
Subject: [dba-VB] DotNet passing by value
Message-ID: <021f01c5aa2e$c88d7b20$6c7aa8c0@ColbyM6805>
As you might be aware, VB.Net (and I assume the other .net languages as
well) pass all variables by value. But what does this mean, and is it true.
As you know, everything in .net is an object, even common variables such as
an integer or decimal etc. Passing by value (in other languages) means
placing a COPY of the variable (or object in this case) on the stack as the
function is called. In VBA for example, when you pass by value, it really
does ONLY for the simple data types, passing anything else (including
strings) by value.
Imagine passing a string, which could be a million bytes, by value -
literally making a copy and passing that into the stack. IIRC the total
stack space for a given program in an Intel machine is something like 128
kbytes which means that passing a single (huge) string by value could cause
a stack overflow. Now DotNet comes along claiming to pass everything by
value. Is this more doublespeak? And if so, what is the truth?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 07:38:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 08:38:40 -0400
Subject: [dba-VB] OT: FireFox not wrapping
Message-ID: <022401c5aa3b$19dacfd0$6c7aa8c0@ColbyM6805>
Does anyone know how to get firefox to wrap to the screen dimensions? I am
viewing MS pages which trail off to the side (have to use the slider) in FF
but wrap correctly in IE.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 08:15:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 09:15:02 -0400
Subject: [dba-VB] Passing null values to a function
Message-ID: <022701c5aa40$2dd57580$6c7aa8c0@ColbyM6805>
I have designed a class, with the New widget (constructor) having a set of
parameters, with the parameters type declared.
New(ByVal lintPKID As Int32, ByVal lstrForeignName As String, ByVal
lstrLocalName As String, _
ByVal lintLen As Int16, ByVal lintPosStart As Int16,
ByVal lintPosStop As Int16, _
ByVal lblnActive As Boolean, ByVal lblnCritical As
Boolean, _
ByVal lstrForeignDescr As String, ByVal lstrLocalDescr
As String, _
ByVal lstrFmt As String, ByVal lblnRightJustified As
Boolean, ByVal lstrNotes As String)
The problem I am running in to is that I am loading this stuff from a table.
I have a class that I initialize, which returns a data reader, and I take
the fields from the reader and pass the values in as follows:
Dim lclsData As clsData
Dim lDr As OleDbDataReader
lclsData = New clsData(lstrDataProvider, lstrDataSrc) 'Get an
instance of clsData
lclsData.pSQL = "SELECT * FROM " & lstrTblName & " WHERE ACTIVE =
True;" 'Set the SQL statement
If lclsData.mDrOpen() Then 'Open the reader
Dim lclsFld As clsFld 'dim a variable to hold clsFld instances
lDr = lclsData.pDR 'Get the data reader
While lDr.Read() 'Cycle through the field format records
'Loading the data from each field format record into the
clsFld instance
lclsFld = New clsFld(lDr("PKID"), lDr("ForeignFldName"),
lDr("LocalFldName"), _
lDr("Length"), lDr("PosStart"),
lDr("PosStop"), _
lDr("Active"), lDr("Critical"), _
lDr("ForeignDescr"),
lDr("LocalDescr"), _
lDr("Format"),
lDr("RightJustified"), lDr("Notes"))
The last line is pulling null values out of the "RightJustified" and "Notes"
fields and trying to pass them in. The program is throwing a runtime error
- "cast from type dbNull to type String not valid"
In this specific case I can go in and "fix" the source data but how do I
handle this if nulls are a valid possibility and I want them to be allowed
to be passed in? Do I need to change my parameter type to object (or
untyped)?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From bheid at appdevgrp.com Mon Aug 29 10:33:09 2005
From: bheid at appdevgrp.com (Bobby Heid)
Date: Mon, 29 Aug 2005 11:33:09 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
In-Reply-To: <916187228923D311A6FE00A0CC3FAA30C6DDF2@ADGSERVER>
Message-ID: <916187228923D311A6FE00A0CC3FAA30ABEEEA@ADGSERVER>
Cool! Thanks John.
Bobby
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 7:11 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
From fhtapia at gmail.com Mon Aug 29 13:25:16 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 11:25:16 -0700
Subject: [dba-VB] XML DOM to string?
Message-ID:
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Mon Aug 29 14:17:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Mon, 29 Aug 2005 15:17:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Francisco,
I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 2:25 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] XML DOM to string?
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Mon Aug 29 15:32:24 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 13:32:24 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID:
Well I need the XML formated in the way I metioned earlier, that's
because I then make a call to a soap object in which it calls a PICK
database (Unidata) to deliver an order. Originally I had a For XML
call from sql server but I was not able to take that result and stuff
it into a variable, so I did it in VB, I have a class that I use to
create the xml as previously listed, so I finished my document, but
wanted to simply make the soap call when I realized that this was an
object and not a string, thus it wasn't gonna work. My current
solution is to save it temporarily to the disk and re-read it back to
a string variable as a text file using LOF, it works fine, and on my
system is actually really quick, but it was just a bother.
On 8/29/05, Jim DeMarco wrote:
> Francisco,
>
> I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 2:25 PM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] XML DOM to string?
>
>
> I'm messing around w/ XML and it's quite late I suppose since there
> really is so much I do not know... what I'm trying to do, I have a
> class that I use to create a complex XML, that is:
>
> I can save my xmldom object down to a file, but then I'd have to
> re-open it and read it all back into a string, and I wondered since
> it's in memory if I can just somehow save it to a string instead...
> any clues?
> Thanks
>
>
> WSOrder>
> -
> FO440
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> -
> 93-1000
> 10
> 21222
>
> -
> 22-2222
> 5
> 50101
>
> -
> 33-3333
> 33
> 696969
>
>
>
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From martyconnelly at shaw.ca Mon Aug 29 17:37:33 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Mon, 29 Aug 2005 15:37:33 -0700
Subject: [dba-VB] XML DOM to string?
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID: <43138E2D.1060204@shaw.ca>
Why not grab the intial html string returned down the wire by the soap
call before you place it in the xmldom.
It would look something like this. Just strip off the envelope xml code
and use the soap body.
Assuming you are using xmlhttp it would be contained in
XMLHTTP.responseXML.xml
rather than XMLHTTP.responseText.
00000-0000
Francisco Tapia wrote:
>Well I need the XML formated in the way I metioned earlier, that's
>because I then make a call to a soap object in which it calls a PICK
>database (Unidata) to deliver an order. Originally I had a For XML
>call from sql server but I was not able to take that result and stuff
>it into a variable, so I did it in VB, I have a class that I use to
>create the xml as previously listed, so I finished my document, but
>wanted to simply make the soap call when I realized that this was an
>object and not a string, thus it wasn't gonna work. My current
>solution is to save it temporarily to the disk and re-read it back to
>a string variable as a text file using LOF, it works fine, and on my
>system is actually really quick, but it was just a bother.
>
>On 8/29/05, Jim DeMarco wrote:
>
>
>>Francisco,
>>
>>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>>
>>Jim DeMarco
>>
>>-----Original Message-----
>>From: dba-vb-bounces at databaseadvisors.com
>>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
>>Sent: Monday, August 29, 2005 2:25 PM
>>To: dba-vb at databaseadvisors.com
>>Subject: [dba-VB] XML DOM to string?
>>
>>
>>I'm messing around w/ XML and it's quite late I suppose since there
>>really is so much I do not know... what I'm trying to do, I have a
>>class that I use to create a complex XML, that is:
>>
>>I can save my xmldom object down to a file, but then I'd have to
>>re-open it and read it all back into a string, and I wondered since
>>it's in memory if I can just somehow save it to a string instead...
>>any clues?
>>Thanks
>>
>>
>>WSOrder>
>>-
>> FO440
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>-
>>-
>> 93-1000
>> 10
>> 21222
>>
>>-
>> 22-2222
>> 5
>> 50101
>>
>>-
>> 33-3333
>> 33
>> 696969
>>
>>
>>
>>
>>
>>--
>>-Francisco
>>http://pcthis.blogspot.com |PC news with out the jargon!
>>http://sqlthis.blogspot.com | Tsql and More...
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>***********************************************************************************
>>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
>>***********************************************************************************
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From fhtapia at gmail.com Mon Aug 29 22:38:25 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 20:38:25 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <43138E2D.1060204@shaw.ca>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
<43138E2D.1060204@shaw.ca>
Message-ID:
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 06:58:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 07:58:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Would using the FileSystemObject and opening a TextStream help at all?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 11:38 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Tue Aug 30 07:58:37 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Tue, 30 Aug 2005 05:58:37 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Message-ID:
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:33:54 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:33:54 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D2F@TTNEXCHCL2.hshhp.com>
Francisco,
Here's some VB 6 code that will return the XML without the need to write to a file.
HTH,
Jim DeMarco
=============================
Public Function MyXMLString() As String
Dim oXML As MSXML2.DOMDocument30
Dim oElement As IXMLDOMElement
Const FILE_NOT_FOUND_ERROR = 53
Set oXML = New DOMDocument30
oXML.async = False
'
If Len(Dir("c:\test.xml")) = 0 Then
Err.Raise FILE_NOT_FOUND_ERROR, "MyTest:MyXMLString", Err.Description
End If
oXML.Load "c:\test.xml"
If oXML.parseError.errorCode <> 0 Then
Err.Raise oXML.parseError.errorCode, "MyTest:MyXMLString", oXML.parseError.reason
End If
Set oElement = oXML.documentElement
MyXMLString = oElement.xml
End Function
Private Sub Form_Load()
Debug.Print MyXMLString
End Sub
=============================
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:35:22 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:35:22 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D30@TTNEXCHCL2.hshhp.com>
Sorry I should have mentioned that even though I opened a file to get the XML for the example I just posted you can do the same with a DOM object already loaded in memory.
Jim D.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From listmaster at databaseadvisors.com Wed Aug 31 08:21:41 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Wed, 31 Aug 2005 09:21:41 -0400
Subject: [dba-VB] Administrivia - List Software Upgrade - Sep 4
Message-ID: <431576A5.23677.326CD85@listmaster.databaseadvisors.com>
The software that runs our list has released a new version to fix
some security issues, add some new features to help out the admins
and mods and some bug fixes.
So I will be upgrading the software on Sunday Sep 4. This will mean
the lists will be down starting at 10am (EDT - UTC -0400) on Sunday
Set 4. If the previous upgrades are any indication, they will be down
for less than 1/2 hour. So there won't be much disruption.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
Failure is not an option. It comes bundled with the software.
From jwcolby at colbyconsulting.com Wed Aug 3 22:08:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:08:40 -0400
Subject: [dba-VB] Inheriting collections
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007b01c598a1$d0afdcb0$6c7aa8c0@ColbyM6805>
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 3 22:11:08 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:11:08 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
Has anyone seen anything indicating the relative speed between "identical
code" in these two languages? I went looking for a way to test .net code
and promptly got bogged down in issues like data collection distorting the
numbers etc. I'm just wondering if anyone has a feel for the relative
speeds? Similar, very different?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Wed Aug 3 22:21:33 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Thu, 04 Aug 2005 13:21:33 +1000
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
References: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between "identical
> code" in these two languages? I went looking for a way to test .net code
> and promptly got bogged down in issues like data collection distorting the
> numbers etc. I'm just wondering if anyone has a feel for the relative
> speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From jwcolby at colbyconsulting.com Wed Aug 3 22:41:18 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:41:18 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
Message-ID: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Yea I read that, but that is vb not vba.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, August 03, 2005 11:22 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Speed - vb.net vs vba
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between
> "identical code" in these two languages? I went looking for a way to
> test .net code and promptly got bogged down in issues like data
> collection distorting the numbers etc. I'm just wondering if anyone
> has a feel for the relative speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Thu Aug 4 01:09:50 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 03 Aug 2005 23:09:50 -0700
Subject: [dba-VB] Speed - vb.net vs vba
References: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Message-ID: <42F1B12E.4020904@shaw.ca>
Well I could show you how to write direct Intel Machine OpCode via DOS
copy con: c:\temp\myprog.exe
No assembler no nothing, but would you want to do it.
Most speed can be gained by proper algorithms at times compilers can be
irrelevant
http://www.xbeat.net/vbspeed/index.htm
John W. Colby wrote:
>Yea I read that, but that is vb not vba.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
>Sent: Wednesday, August 03, 2005 11:22 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] Speed - vb.net vs vba
>
>
>On 3 Aug 2005 at 23:11, John W. Colby wrote:
>
>
>
>>Has anyone seen anything indicating the relative speed between
>>"identical code" in these two languages? I went looking for a way to
>>test .net code and promptly got bogged down in issues like data
>>collection distorting the numbers etc. I'm just wondering if anyone
>>has a feel for the relative speeds? Similar, very different?
>>
>>
>>
>
>Try
>http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From Jdemarco at hudsonhealthplan.org Thu Aug 4 07:00:13 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Thu, 4 Aug 2005 08:00:13 -0400
Subject: [dba-VB] Inheriting collections
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
I was pretty busy at the time of your original post but a quick take would be that inheriting from a collection will help keep your syntax a bit cleaner:
objSysVarTbl.CollectionMethod
objSysVarTbl.CollectionObject.CollectionMethod
HTH
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Wednesday, August 03, 2005 11:09 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Inheriting collections
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From jwcolby at colbyconsulting.com Tue Aug 9 13:04:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 14:04:22 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
Message-ID: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Tue Aug 9 14:04:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Tue, 9 Aug 2005 15:04:49 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 16:17:41 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 17:17:41 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To:
Message-ID: <008601c59d27$c6b8c390$6c7aa8c0@ColbyM6805>
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 18:24:57 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 19:24:57 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
Message-ID: <008701c59d39$91847180$6c7aa8c0@ColbyM6805>
This is what I found for doing this:
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
>From this article:
http://www.dotnetbips.com/51AA8C48-7DD4-416B-A9D2-63C26644C120.aspx?articlei
d=28
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 10 06:10:42 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 10 Aug 2005 07:10:42 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
I'm not sure that you have to be logged in. But I am using it on Windows
2003 Server under the administrator account.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 5:18 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From listmaster at databaseadvisors.com Sun Aug 14 08:50:58 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Sun, 14 Aug 2005 09:50:58 -0400
Subject: [dba-VB] Administrivia - Lists Temporarily Down
Message-ID: <42FF1402.5531.150D8B@listmaster.databaseadvisors.com>
The company that hosts our lists will be doing some maintenance on
their network from 11PM Aug 16 to 6 AM Aug 17 CST (04:00 to 11:00 on
Aug 17 UTC - http://www.timezoneconverter.com/cgi-bin/tzc.tzc to find
out what time it is in your timezone))
They are upgrading their core routers, which will cause dba's list,
and associated web pages (not the Website, but the list pages,
including archives) to be down, anywhere from a few minutes to an
hour.
Hopefully this does not cause anyone too much of an inconvenience.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
If you can't be a good example, then you'll just have to be a
horrible warning.
From R.Griffiths at bury.gov.uk Tue Aug 16 10:46:56 2005
From: R.Griffiths at bury.gov.uk (Griffiths, Richard)
Date: Tue, 16 Aug 2005 16:46:56 +0100
Subject: [dba-VB] Update BE
Message-ID: <200508161536.j7GFan926891@smarthost.yourcomms.net>
Hi
After advice/resources.
I have written an application using vb.net which is to run with A2K BE
and SQL 2000 BE.
I am trying to think about how to update the back end. I have a number
of options, one being to write VB code and using DAO or ADO update the
BE. But I think this will involve further deployment of VB and Jet/Vba
and MS Access (runtime) etc.
The other option (no doubt there are others) is to write CREATE TABLE
and ALTER TABLE statements (and this can be deployed within a exe
running vb.net). I think this is tidier, however there is not much
documentation on this process ( CREATE TABLE and ALTER TABLE etc) for MS
Access. Does anyone have code and/or can offer good sources on the web
to help me here. Any other solutions?
Many thanks
Richard
From jwcolby at colbyconsulting.com Thu Aug 18 10:32:27 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:32:27 -0400
Subject: [dba-VB] Running an app from a service
Message-ID: <011101c5a40a$0d5a3110$6c7aa8c0@ColbyM6805>
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Thu Aug 18 10:37:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:37:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 10:59:14 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:59:14 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
Message-ID: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 10:58:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:58:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:11:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:11:28 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
Message-ID: <011901c5a40f$7d2e05c0$6c7aa8c0@ColbyM6805>
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
From DWUTKA at marlow.com Thu Aug 18 11:14:23 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 11:14:23 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
LOL. Jack of all trades, master of none! ;)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 11:11 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:38:24 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:38:24 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
Message-ID: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
I prefer to be Jack of all trades, master of one.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 12:14 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. Jack of all trades, master of none! ;)
Drew
From carbonnb at gmail.com Thu Aug 18 13:30:45 2005
From: carbonnb at gmail.com (Bryan Carbonnell)
Date: Thu, 18 Aug 2005 14:30:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
References: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
<011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
Message-ID:
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
From DWUTKA at marlow.com Thu Aug 18 13:33:11 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 13:33:11 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:01:12 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:01:12 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To:
Message-ID: <011f01c5a427$36fbab30$6c7aa8c0@ColbyM6805>
ROTFL. It changes year to year. And of course I get a LOT of arguments
whether I am even an apprentice at anything.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
Sent: Thursday, August 18, 2005 2:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:02:15 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:02:15 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Message-ID: <012001c5a427$5e1213d0$6c7aa8c0@ColbyM6805>
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:13:46 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:13:46 -0400
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Message-ID: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Thu Aug 18 14:21:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:21:28 -0400
Subject: [dba-VB] NSpring
Message-ID: <012401c5a42a$0bdcab40$6c7aa8c0@ColbyM6805>
Has anyone looked at / evaluated / used Nspring -
http://sourceforge.net/projects/nspring
I am in need of a good logger, and I use collections a LOT in my programming
so this also looks promising on that front. I understand that I can just
reference the project from my code so it should not matter too much that I
choose VB.Net and this stuff is in C#, correct?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From ridermark at gmail.com Thu Aug 18 14:26:17 2005
From: ridermark at gmail.com (Mark Rider)
Date: Thu, 18 Aug 2005 14:26:17 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
References: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
<012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Message-ID:
In the registry under HKCU\Software\Microsoft\VisualStudio\7.1 there
is a ProjectMRUList key and a FileMRUList key. Deleting the strings
in there will clear it all out.
May be a bit heavy handed, but that is the only way I have found to do it.
--
Mark Rider
http://commonsensesecurity.info
There are 10 kinds of people in the world:
Those who understand binary and those who don't.
From DWUTKA at marlow.com Thu Aug 18 17:25:42 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:25:42 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 17:26:12 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:26:12 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
Message-ID: <123701F54509D9119A4F00D0B747349016DDC3@main2.marlow.com>
I would guess it's in the registry.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:14 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Clearing the history list in .net IDE
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 17:58:45 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 18:58:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
Message-ID: <012701c5a448$6843edd0$6c7aa8c0@ColbyM6805>
Uh..no, psycho maybe.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 6:26 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 20:57:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 21:57:47 -0400
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Thu Aug 18 21:39:05 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Fri, 19 Aug 2005 12:39:05 +1000
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305D2E9.11360.31C0985@stuart.lexacorp.com.pg>
On 18 Aug 2005 at 21:57, John W. Colby wrote:
....
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
>
.....
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
Do you have an SMTP server running on your local machine?
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas?
Not really, but SMTP certainly shouldn't be going anywhere near anything
called ".web.http....."
If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
Try Blat.DLL from http://www.geocities.com/toby_korn/blat/
It's easy to use and I can talk you through it if you run into problems.
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From ebarro at afsweb.com Thu Aug 18 21:54:34 2005
From: ebarro at afsweb.com (Eric Barro)
Date: Thu, 18 Aug 2005 19:54:34 -0700
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID:
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document, previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in respect of such communication.
From jwcolby at colbyconsulting.com Thu Aug 18 22:08:35 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 23:08:35 -0400
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To:
Message-ID: <013101c5a46b$4cabf180$6c7aa8c0@ColbyM6805>
I am attempting to create a system that will take data from a database,
export it into a text file, then send that file as an attachment to an email
to an insurance company. Later I will need to get an FTP channel going to
send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
just have DotNet directly send the email.
My home office is connected to the internet via the cable company. They do
port 25 blocking, forcing me to send to their SMTP server (from here at my
office). It was for that reason that I sent to mail.optonline.com, as that
is the SMTP server address used by my Outlook (from my home office). I am
actually in the process of switching to a new hosting company that will
allow me to use an alternate port to transmit email. That will still
require me to hit that company's SMTP server, but at least I can send from
anywhere I may be working to the same SMTP address. As it currently stands,
I have to constantly futz with the SMTP server address as I move my laptop
from my home to my client to my sister-in-law etc. All three of those
locations goes through a ISP that performs port 25 blocking.
Anyway.....
I am trying to set up email for my vb.net program. It would be nice if it
just worked, from wherever I plopped it down. And, of course, I do not
understand anything about email, SMTP servers, or even vb.net. I guess that
would make me jack of all trades... ;-) Or at least master of none of
these.
Someday I hope to be able to say I at least understand the vb.net part.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: Thursday, August 18, 2005 10:55 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Smtp mail from vb.net
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook. I
found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document,
previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended
solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this
transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its
attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to
the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly
required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal
right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in
respect of such communication.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Fri Aug 19 02:31:17 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Fri, 19 Aug 2005 02:31:17 -0500
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <123701F54509D9119A4F00D0B747349016DDC6@main2.marlow.com>
Why not just use SMTP directly. Remind me tomorrow, and I'll send you the
VB code I wrote to actually communicate (and send email) through SMTP
commands (using winsocks)
Drew (I'm going to bed, otherwise I'd dig it up now...)
> -----Original Message-----
> From: John W. Colby [SMTP:jwcolby at colbyconsulting.com]
> Sent: Thursday, August 18, 2005 10:09 PM
> To: ebarro at afsweb.com; dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
> I am attempting to create a system that will take data from a database,
> export it into a text file, then send that file as an attachment to an
> email
> to an insurance company. Later I will need to get an FTP channel going to
> send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
> just have DotNet directly send the email.
>
> My home office is connected to the internet via the cable company. They
> do
> port 25 blocking, forcing me to send to their SMTP server (from here at my
> office). It was for that reason that I sent to mail.optonline.com, as
> that
> is the SMTP server address used by my Outlook (from my home office). I am
> actually in the process of switching to a new hosting company that will
> allow me to use an alternate port to transmit email. That will still
> require me to hit that company's SMTP server, but at least I can send from
> anywhere I may be working to the same SMTP address. As it currently
> stands,
> I have to constantly futz with the SMTP server address as I move my laptop
> from my home to my client to my sister-in-law etc. All three of those
> locations goes through a ISP that performs port 25 blocking.
>
> Anyway.....
>
> I am trying to set up email for my vb.net program. It would be nice if it
> just worked, from wherever I plopped it down. And, of course, I do not
> understand anything about email, SMTP servers, or even vb.net. I guess
> that
> would make me jack of all trades... ;-) Or at least master of none of
> these.
>
> Someday I hope to be able to say I at least understand the vb.net part.
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
> Sent: Thursday, August 18, 2005 10:55 PM
> To: dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
>
> If you are trying to send via mail.optonline.com and it resolves to one of
> your machines on the internal network it won't work. Try using localhost
> which resolves to 127.0.0.1 (assuming that the mail server is your local
> machine) or the internal IP of the smtp server.
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Thursday, August 18, 2005 6:58 PM
> To: VBA
> Subject: [dba-VB] Smtp mail from vb.net
>
> I'm trying to get .net to send email for me without going through Outlook.
> I
> found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box
> though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
>
>
> ----------------------------------------------------------------
> The information contained in this e-mail message and any file, document,
> previous e-mail message and/or attachment transmitted
> herewith is confidential and may be legally privileged. It is intended
> solely for the private use of the addressee and must not be
> disclosed to or used by anyone other than the addressee. If you receive
> this
> transmission by error, please immediately notify the
> sender by reply e-mail and destroy the original transmission and its
> attachments without reading or saving it in any manner. If you
> are not the intended recipient, or a person responsible for delivering it
> to
> the intended recipient, you are hereby notified that any
> disclosure, copying, distribution or use of any of the information
> contained
> in or attached to this transmission is STRICTLY
> PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
> free as information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message, which arise as a result of
> email transmission. Users and employees of the e-mail system are expressly
> required not to make defamatory statements and not
> to infringe or authorize any infringement of copyright or any other legal
> right by email communications. Any such communication is
> contrary to company policy. The company will not accept any liability in
> respect of such communication.
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
From sgsax at ksu.edu Fri Aug 19 10:13:55 2005
From: sgsax at ksu.edu (Seth Galitzer)
Date: Fri, 19 Aug 2005 10:13:55 -0500
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
References: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305F733.7030507@ksu.edu>
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through Outlook.
> I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University
From jwcolby at colbyconsulting.com Mon Aug 22 21:35:59 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 22:35:59 -0400
Subject: [dba-VB] Setting up SQL Server on a system
In-Reply-To: <4305F733.7030507@ksu.edu>
Message-ID: <000801c5a78b$68c94200$6c7aa8c0@ColbyM6805>
What is involved in setting up the lite version of SQL server that comes
with .net? Is it already there if the .net framework is there? If so, how
do you determine what the server is called when you install a project to
run?
I have a service that I created that has an installer "built in". I can
install the service relatively easily and it is running etc. Now I want
that service to start a VB.Net application that has a table in SQL server.
That is NOT critical (an mdb works just fine) but I want to learn how to use
the SQL Server instance that comes with .Net.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Seth Galitzer
Sent: Friday, August 19, 2005 11:14 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Smtp mail from vb.net
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through
> Outlook. I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing
> obvious happens, no exception thrown. No email is delivered to my
> mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws
> an error "system.web.httpexception - could not access cdo.message
> object".
>
> Any ideas? If not does anyopne have a drop in function for sending
> email that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Mon Aug 22 22:06:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 23:06:22 -0400
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 08:06:14 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 08:06:14 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 08:58:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 09:58:40 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Message-ID: <002801c5a7ea$c7485780$6c7aa8c0@ColbyM6805>
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 10:42:53 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 11:42:53 -0400
Subject: [dba-VB] VB.Net - Data reader class
Message-ID: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 11:35:19 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 11:35:19 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE13@main2.marlow.com>
Why fire a timer over and over, to check things. Look up SetWaitableTimer.
It's one of a few API's where you can set a 'fire and forget' timer. The OS
will just alert you when the time is reached for something to run.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Tuesday, August 23, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 13:41:51 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 14:41:51 -0400
Subject: [dba-VB] .net error codes
Message-ID: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From mikedorism at verizon.net Tue Aug 23 13:47:43 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:47:43 -0400
Subject: [dba-VB] .net error codes
In-Reply-To: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
Message-ID: <000201c5a813$266ba140$2e01a8c0@dorismanning>
I know what you mean. With VBA error codes, you could just trap the error
number and go from there. With .Net, you have to trap the type of
exception, and then the number/message of the exception.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 2:42 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] .net error codes
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From mikedorism at verizon.net Tue Aug 23 13:56:47 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:56:47 -0400
Subject: [dba-VB] VB.Net - Data reader class
In-Reply-To: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
Message-ID: <000301c5a814$6ad51950$2e01a8c0@dorismanning>
Hi John,
Your code looks really good. The only thing you are missing is checking the
status of the connection before opening or closing it.
As for your questions about the data reader...The connection and command
object have to be open in order for the data reader to work. I do not open
the connection or command until the data reader is needed so the flow you
have makes sense to me.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 11:43 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Data reader class
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From artful at rogers.com Tue Aug 23 15:49:28 2005
From: artful at rogers.com (Arthur Fuller)
Date: Tue, 23 Aug 2005 16:49:28 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
Message-ID: <200508232049.j7NKnUR31133@databaseadvisors.com>
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business.
To put it another way, everything you can blame on MS should be blamed on
MS. Set it up in the BE and DO NOT INTERFERE.
Not to say there are no reasons for services, but from what you have
described thus far, this is NOT one of them. Schedule the job at a frequency
you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going.
AF`s Rule 1: everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 15:56:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 16:56:03 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003c01c5a825$12c824d0$6c7aa8c0@ColbyM6805>
LOL, this is an MDB.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 16:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 17:32:05 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
OK< sorry, I just fired off that response.
This is a system that pulls data out of a set of related tables and massages
it into a text file. The end result is a fixed width report (at this
moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
DOZENS). This report will be sent to a client Insurance company where it
will be imported into a mainframe.
The "jobs" are reports that have to be sent. The same report may have to be
sent multiple places, attached to an email in one case, FTPed in another.
It is in fact also being sent to our own people (MY client, the call center)
in a CSV format. Related records from a DOZEN tables (or more) have to be
pulled, some have to be denormalized (placed in a temp table) then
everything linked back together. Once the data is in a "single record"
format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
format. Unfortunately the client keeps changing where the fields go in the
record, what the format looks like etc.
And yes, this is happening on a regular basis. The client (insurance
company) is moving their entire company to a new software package, they are
clueless as you might expect, and things move slowly. TWO years so far (and
counting). They have even flopped back and forth between Fixed width and
comma delimited (and back again). But... I design to allow me to just
change the table.
As a result, I have set it all up so that it is table driven. I have a
table of what they call their fields, what position in the "big string" each
field (start and stop bytes), the name of the field in MY application which
maps to the field in THEIR application, the format string that makes it look
like they want, whether the field MUST exist in order to even allow the
export to occur etc.
I read the format table out and in to a field def/supervisor class system.
Another class causes the data denormalization to occur, handles some details
like checking that offsets (dates) fall within specific windows, pulls the
data out of my query and hands it off to the field supervisor which hands
each data piece to the appropriate "field class" which formats the field per
the instructions in the format table and hands back the piece to the
supervisor which inserts it into the "big string" in the right place... OR
into a comma delimited "CSV" format string, and hands the finished formatted
"big string" off to the data logger which writes it out to a file on a disk
with a specific name and a specific location on the hard disk.
Once the entire file is written, the finished file is placed in a "job"
queue to be sent out to wherever it is going.
This process is an entire application, with (in Access) 11 classes and a
handful of modules. There is absolutely nothing trivial about doing this.
The upside is that as the client comes back and says "no, move this field to
here, left justify in the field instead of right, and oh, by the way it
should have 4 decimal digits after the decimal point instead of two", I can
just go into my definition table and make the appropriate changes, and the
new report pops out as they request. Furthermore the process is broken down
into "black boxes" that create the export data, logs the finished export
string, logs the fact that a given record was exported and what file on the
hard disk it was placed in, transmits the file to the correct place, logs
the fact that the specified file was transmitted. When I am finished I can
run a query to see if a claim record was sent, what file it is in and where
on the disk it resides, what day and time it was sent, what method and
address was used to send it etc. If a record fails at any step, an email is
sent to me and my "boss" at my client informing me that step X of the
process failed.
Doing that does NOT allow "setting it up in the BE and do not interfere".
This is NOT an FE in the classic sense, it is a report generator / logger /
sender application, which, just happens to be, in an FE (of its own). All
of this is working at this point but it is written in VBA / Access FE
container. I am looking at moving the entire thing to .Net, on my own dime,
as an exercise in learning VB.Net.
Now... For the piece about which I am asking, I am discussing the scheduler
part, what report is sent to whom, using what transmission method, at what
time of the day/night, including / excluding holidays / weekends / custom
schedule etc. The client wants it, and the client is willing to pay for it,
so the client gets it. I am just examining my options for moving JUST THIS
PIECE (since the whole thing is modular anyway) into VB.Net.
Does that make it a little clearer? ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 24 02:07:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 03:07:03 -0400
Subject: [dba-VB] Don't ya just love it when...
Message-ID: <004a01c5a87a$70fc3320$6c7aa8c0@ColbyM6805>
I found what looks to be a really cool RSS Feed extractor to pull rss data
into a database.
VB.Net http://www.vbdotnetheaven.com/Code/Aug2003/2147.asp
and C#.net. http://www.c-sharpcorner.com//Code/2002/Aug/RssFeedProject.asp
Of course it doesn't work in VB.net for a variety of reasons. The script
for building the SQL database just isn't to be found anywhere. Luckily I
went and found the C# version, whereupon in the zip file I found the SQL
script and ran it.
Next, it places the tables in the Master database. Sigh.
Next, it needs an XML config file configured and placed in the same
directory as the resulting EXE. Again, not in the VB version, but right
there in the C# zip. However I don't know how to configure it. The
contents looks like:
Obviously the connection string will need to be a SQL Server connection
string (which I have seen but can't just write) and the database (I assume)
needs to be "Master" (since that's where the tables were thrown by the
script)?
Can anyone work with me to see if this thing will actually work if I get
this last piece happening. I really want to pull the RSS feed for my
NetFlix orders and Queue into the database for posterity, particularly my
recent orders RSS.
RSS is cool, but if I can grab the data it will be even more cool.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 10:14:58 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:14:58 -0400
Subject: [dba-VB] RSS Feed database
Message-ID: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Do I have no takers helping me get this thing working? The end result will
be a system for logging an RSS feed into data tables for analysis or use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
----------------------------------------------------------------------------
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
----------------------------------------------------------------------------
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Wed Aug 24 10:24:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:24:49 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
Where is the Return statement?
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 10:31:25 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:31:25 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
I'm just shooting int the dark... How about parenths around the @ID int
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From fhtapia at gmail.com Wed Aug 24 10:41:02 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Wed, 24 Aug 2005 08:41:02 -0700
Subject: [dba-VB] RSS Feed database
In-Reply-To:
References:
Message-ID:
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will
> be a system for logging an RSS feed into data tables for analysis or
> use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table.
> I am logging in to the database. The issue at this point is that the SP
> that is supposed to return the rows in the database apparently doesn't.
>
> The SP looks like:
>
> ------------------------------------------------------------------------
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From jwcolby at colbyconsulting.com Wed Aug 24 10:52:36 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:52:36 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To:
Message-ID: <011c01c5a8c3$dbf235a0$6c7aa8c0@ColbyM6805>
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Connec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value = id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there, it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for some
reason the SP is not returning data. That is the first error encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 11:03:44 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 12:03:44 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
John,
Try opening the connection earlier in the code.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:53 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] RSS Feed database
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Co
nnec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value =
id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there,
it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I
get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for
some
reason the SP is not returning data. That is the first error
encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco
Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
>
------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 11:47:20 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 09:47:20 -0700
Subject: [dba-VB] RSS Feed database
References: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Message-ID: <430CA498.4080302@shaw.ca>
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept.
I just didn't feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html"
'objExplorer.Navigate "http://www.Viescas.com/"
'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/"
Do While (objExplorer.Busy)
Loop
Dim webtx As String
Dim strHTML As String
Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
"
objDocument.Writeln "
"
objDocument.Writeln strpassHTML
objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result will
>be a system for logging an RSS feed into data tables for analysis or use.
>Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource table.
>I am logging in to the database. The issue at this point is that the SP
>that is supposed to return the rows in the database apparently doesn't.
>
>The SP looks like:
>
>----------------------------------------------------------------------------
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>----------------------------------------------------------------------------
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 12:22:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 13:22:47 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To: <430CA498.4080302@shaw.ca>
Message-ID: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Marty,
My purpose isn't to see a web page but rather to actually parse the xml file
and grab the data into a table. Specifically I just got an account with
NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
more importantly to show what you have rented. I want to capture a database
of what I have rented so that I don't rent it again (or know that I am doing
so), but also to get a table with the url back to the movie description.
Thus I really do want to open the feed, read it in, and grab the specific
fields and write them into a table.
In fact I have managed to get around the SQL Server issue by using the class
I posted yesterday for opening a reader (in Access). Access it trivial to
get to and get the data into and out of so I just rewrote the first part to
use my little class.
As my momma used to say...
"There's more ways to kill a cat than choking him to death on butter"
Luckily the part that opens the RSS feed just works. I am now working on
replacing the write of the data back out to SQL server with code to use my
class - modified a bit.
I wish I knew more about SQL Server but I have to do what works and Access
works ATM.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: Wednesday, August 24, 2005 12:47 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept. I just didn't
feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
"My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
" objDocument.Writeln "
"
objDocument.Writeln strpassHTML objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result
>will be a system for logging an RSS feed into data tables for analysis
>or use. Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource
>table. I am logging in to the database. The issue at this point is
>that the SP that is supposed to return the rows in the database
>apparently doesn't.
>
>The SP looks like:
>
>-----------------------------------------------------------------------
>-----
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>---------------------------------------------------------------------------
-
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 14:34:26 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 12:34:26 -0700
Subject: [dba-VB] RSS Feed database
References: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Message-ID: <430CCBC2.4080300@shaw.ca>
Well you can do with a short subroutine to put rss xml in table , a lot
of debug statement
just to keep track of what I was doing. Uses XPath statement to grab
appropriate nodes from DOM.
'LoadXML "http://msdn.microsoft.com/rss.xml","Just Published"
'LoadXML "http://msdn.microsoft.com/webservices/rss.xml","Web Services"
'LoadXML "http://msdn.microsoft.com/vstudio/rss.xml","Visual Studio"
'LoadXML "http://msdn.microsoft.com/netframework/rss.xml","Net Framework"
'LoadXML "http://msdn.microsoft.com/vcsharp/rss.xml","VC Sharp"
'LoadXML "http://msdn.microsoft.com/visualc/rss.xml", "VisualC"
'LoadXML "http://msdn.microsoft.com/security/rss.xml", "Security"
'Loadxml "http://www.kbalertz.com/rss/acc.xml","accesskbalert"
Public Sub LoadXML(ByRef AdviserXML As String, strFeed As String)
'second parameter just provides a feed name field in general table
' On Error GoTo ErrorHandler
Const ACTION_NAME As String = "LoadXML"
Dim oDOMDocument As MSXML2.DOMDocument40
Dim oNodeList As IXMLDOMNodeList
Dim oAdviserDetailsNode As IXMLDOMNode
Dim oLowestLevelNode As IXMLDOMElement
Dim objXMLDOMNamedNodeMap As IXMLDOMNamedNodeMap
Dim sTempValue As String
Dim msFPTAdviserID As Object
'temporary database
Dim MyDb As Database
Dim MyRs As Recordset
Dim irec As Long
Dim strTitleLink As String
Set oDOMDocument = New MSXML2.DOMDocument40
oDOMDocument.async = False
oDOMDocument.validateOnParse = False 'very trusting
oDOMDocument.resolveExternals = False
oDOMDocument.preserveWhiteSpace = True
If Not oDOMDocument.Load(AdviserXML) Then
MsgBox Err.number & Err.Description
'Call Err.Raise(ERR_UNABLE_TO_LOAD_ADVISER_XML, ,
ERRDESC_UNABLE_TO_LOAD_ADVISER_XML)
Exit Sub
End If
Debug.Print "grabbed box"
Set oAdviserDetailsNode = oDOMDocument.documentElement
Set objXMLDOMNamedNodeMap = oAdviserDetailsNode.Attributes
'msFPTAdviserID = objXMLDOMNamedNodeMap.getNamedItem("title").nodeValue
Debug.Print "Set"
Debug.Print "msFPT"
Set oNodeList = oAdviserDetailsNode.selectNodes("//item/*")
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("RSSFeed")
irec = 0
MyRs.AddNew
For Each oLowestLevelNode In oNodeList
sTempValue = oLowestLevelNode.Text
' Debug.Print oLowestLevelNode.nodeName & "-" & vbCrLf &
oLowestLevelNode.Text
Select Case oLowestLevelNode.nodeName
Case "title"
Debug.Print sTempValue
MyRs!Title = sTempValue
strTitleLink = sTempValue
Case "PubDate"
Debug.Print sTempValue
MyRs!PubDate = sTempValue
Case "description"
Debug.Print sTempValue
MyRs!fdescription = sTempValue
Case "link"
Debug.Print sTempValue
'MyRs!link = sTempValue
'need # format for clickable link
MyRs!link = sTempValue & "#" & sTempValue & "#"
End Select
irec = irec + 1
If irec = 4 Then
'check if duplicate also check if " in string
Debug.Print DLookup("ID", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))
If IsNull(DLookup("Title", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))) Then
MyRs!feed = strFeed
MyRs.Update
End If
MyRs.AddNew
irec = 0
End If
Next
Set MyRs = Nothing
Set MyDb = Nothing
Set oDOMDocument = Nothing
Set oAdviserDetailsNode = Nothing
Set objXMLDOMNamedNodeMap = Nothing
Exit Sub
ErrorHandler:
' Call NewError.Raise(Err.Number, Err.Source, Err.Description,
'MODULE_NAME, ACTION_NAME, Erl)
End Sub
John W. Colby wrote:
>Marty,
>
>My purpose isn't to see a web page but rather to actually parse the xml file
>and grab the data into a table. Specifically I just got an account with
>NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
>more importantly to show what you have rented. I want to capture a database
>of what I have rented so that I don't rent it again (or know that I am doing
>so), but also to get a table with the url back to the movie description.
>
>Thus I really do want to open the feed, read it in, and grab the specific
>fields and write them into a table.
>
>In fact I have managed to get around the SQL Server issue by using the class
>I posted yesterday for opening a reader (in Access). Access it trivial to
>get to and get the data into and out of so I just rewrote the first part to
>use my little class.
>
>As my momma used to say...
>
>"There's more ways to kill a cat than choking him to death on butter"
>
>Luckily the part that opens the RSS feed just works. I am now working on
>replacing the write of the data back out to SQL server with code to use my
>class - modified a bit.
>
>I wish I knew more about SQL Server but I have to do what works and Access
>works ATM.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
>Sent: Wednesday, August 24, 2005 12:47 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] RSS Feed database
>
>
>I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
>feeds and placed in tables, just did it as a proof of concept. I just didn't
>feel like running it daily to keep it uptodate. never
>found a way tokeep it uptodate or if Ms had an archive.
>I did this a year ago maybe there is something now.
>
>Never fully fleshed it out. If you want a copy, I'll have to check it
>still works.
>
>I have also done things like this that can be done better now through
>RSS Viewers.
>' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
>displays in IE window
>'But it doesn't require much code.
>If you do use this,snaffle the xsl file off my website and use locally
>it will be quicker.
>Save the XSL in notepad with UTF-8 format.
>
>Sub BBCRSSFeed()
>Dim srcTree As Object
>Dim xsltTree As Object
>Dim strHTML As String
> Set srcTree = CreateObject("Msxml.DOMDocument")
> srcTree.async = False
> srcTree.Load
>("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
> 'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
> Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
> xsltTree.async = False
> 'this xsl transform file can also be loaded via a local disk file
> xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
>
> strHTML = srcTree.transformNode(xsltTree)
>
> Debug.Print strHTML
> ' Display transformed xml rss news feed in html via IE 6.0 window
> testIE (strHTML)
>
>End Sub
>Sub testIE(strpassHTML As String)
>'------------------
>
>Dim objExplorer As Object
>Dim objDocument As Object
>Dim strComputer As String
>
>Dim strReturn As String
>
>Set objExplorer = CreateObject("InternetExplorer.Application")
>
>objExplorer.Navigate "about:blank"
>objExplorer.Toolbar = 0
>objExplorer.StatusBar = 0
>objExplorer.Width = 800
>objExplorer.Height = 570
>objExplorer.Left = 0
>objExplorer.Top = 0
>objExplorer.Visible = 1
>'dont't need to navigate to file or http site like below
>'just drop html string created from xslt into the IE document object
>'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
>"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
>'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
>(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
>objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
>"My BBC Technology RSS
>Feed"
>'A little bit of CSS code to make it funky
>objDocument.Writeln " " { background-attachment: fixed; background-position: 97% bottom;
>" & _
> " background-image= 'url(logoBackGround.gif)';background-repeat:
>no-repeat;" & _
> " padding: 5px;font-family='Georgia';font-size: 80%;} >"
>
>objDocument.Writeln ""
>objDocument.Writeln ""
>objDocument.Writeln "BBC Feed | "
>objDocument.Writeln "
" objDocument.Writeln "
"
>objDocument.Writeln strpassHTML objDocument.Writeln ""
>'objDocument.Write()
>objDocument.Close
>'MsgBox "finished"
>Set objExplorer = Nothing
>Set objDocument = Nothing
>
>End Sub
>
>
>
>
>John W. Colby wrote:
>
>
>
>>Do I have no takers helping me get this thing working? The end result
>>will be a system for logging an RSS feed into data tables for analysis
>>or use. Could be niiiice. ;-)
>>
>>I have made good progress, I have a database set up in SQL Server
>>specifically for this project. I have the tables built per the script
>>included in the C# zip. There are two records in the WebNewsSource
>>table. I am logging in to the database. The issue at this point is
>>that the SP that is supposed to return the rows in the database
>>apparently doesn't.
>>
>>The SP looks like:
>>
>>-----------------------------------------------------------------------
>>-----
>>-----
>>-- Stored procedure that will select an existing row from the table
>>'WebNewsSource'
>>-- based on the Primary Key.
>>-- Gets: @ID int
>>---------------------------------------------------------------------------
>>
>>
>-
>
>
>>-----
>>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
>> @ID int
>>AS
>>SET NOCOUNT ON
>>-- SELECT an existing row from the table.
>>SELECT
>> [ID],
>> [Source],
>> [RSSURL],
>> [RSSSelect],
>> [RSSTitle],
>> [RSSLink],
>> [RSSDescription]
>>
>>
>>FROM [dbo].[WebNewsSource]
>
>
>>WHERE
>> [ID] = @ID
>>
>>
>>GO
>>
>>How do I go about just running the SP passing in an ID and viewing the
>>results?
>>
>>John W. Colby
>>www.ColbyConsulting.com
>>
>>Contribute your unused CPU cycles to a good cause:
>>http://folding.stanford.edu/
>>
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>>
>>
>>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 15:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 16:32:05 -0400
Subject: [dba-VB] VB.Net - Executing queries - Microsoft Access connection
Message-ID: <013e01c5a8ea$e41d3460$6c7aa8c0@ColbyM6805>
What object do I use to execute a query against an connection / table. I
have gotten down to the table level but it looks like that is used for
getting a table to bind to a structure. All I really need to do is execute
a SQL statement that I construct on-the-fly that appends a record in a
table.
Microsoft Access connection
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 18:10:39 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 19:10:39 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Message-ID: <014e01c5a901$0af384c0$6c7aa8c0@ColbyM6805>
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From word_diva at hotmail.com Thu Aug 25 11:43:53 2005
From: word_diva at hotmail.com (Nancy Lytle)
Date: Thu, 25 Aug 2005 12:43:53 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report generation
application
In-Reply-To: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
Message-ID:
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they are
>clueless as you might expect, and things move slowly. TWO years so far
>(and
>counting). They have even flopped back and forth between Fixed width and
>comma delimited (and back again). But... I design to allow me to just
>change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each
>field (start and stop bytes), the name of the field in MY application which
>maps to the field in THEIR application, the format string that makes it
>look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class system.
>Another class causes the data denormalization to occur, handles some
>details
>like checking that offsets (dates) fall within specific windows, pulls the
>data out of my query and hands it off to the field supervisor which hands
>each data piece to the appropriate "field class" which formats the field
>per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and a
>handful of modules. There is absolutely nothing trivial about doing this.
>The upside is that as the client comes back and says "no, move this field
>to
>here, left justify in the field instead of right, and oh, by the way it
>should have 4 decimal digits after the decimal point instead of two", I can
>just go into my definition table and make the appropriate changes, and the
>new report pops out as they request. Furthermore the process is broken
>down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not interfere".
>This is NOT an FE in the classic sense, it is a report generator / logger /
>sender application, which, just happens to be, in an FE (of its own). All
>of this is working at this point but it is written in VBA / Access FE
>container. I am looking at moving the entire thing to .Net, on my own
>dime,
>as an exercise in learning VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the scheduler
>part, what report is sent to whom, using what transmission method, at what
>time of the day/night, including / excluding holidays / weekends / custom
>schedule etc. The client wants it, and the client is willing to pay for
>it,
>so the client gets it. I am just examining my options for moving JUST THIS
>PIECE (since the whole thing is modular anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
From jwcolby at colbyconsulting.com Thu Aug 25 12:38:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 25 Aug 2005 13:38:02 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
In-Reply-To:
Message-ID: <01c801c5a99b$be5a2150$6c7aa8c0@ColbyM6805>
Nancy,
The system I use started with a spreadsheet of field definitions I was given
by the insurance company (AGI) who is my client's client. So they sent me
something in spreadsheet format that looked like:
AIGFldName StartPos EndPos FldLen Format And I added on from
there
SomeCurrFld 1 10 10 Cur
SomeTxtFld 11 16 6 text
SomeDteFld 17 24 8 Date
Etc
I took this information and pulled it into an Access table. I then added
MyFldName MyFormatStr Critical IsUsed
Etc
So I now have a single table where I have what their field is called, where
it is in the fixed width string, my matching field name, the format string I
need to use to get it into the format they want, whether it is critical
(don't send without it), whether I actually have any data (field) to go in
that field etc.
What I then did was to build a clsFld that took each FIELD DEFINITION (one
record from this table) and loaded all the data for that record into
variables in the class header. Each clsFld instance is then saved in a
collection in the supervisor of this class (clsRecord), with the KEY being
the field name in MY database. I designed my system such that there is a
clsExport class, a clsRecord, and a clsFld. The record class is
instantiated once, loads the clsFld class instances and stores them into a
collection in the record class.
A method of clsRecord is then called by clsExport (supervisor) class, passed
a single record each time it is called. The clsRecord processes each field
in the record it is passed - iterates the field collection using dao (could
be done id ADO though). Basically clsRecord iterates through the fields in
the record passed in, calls a method in the matching clsFld, passing the
data to clsFld. ClsFld formats the data with the format string (remember
everything is a string in the end), justifies it in the string of the
required length (remember the length field?) and hands back the string to
clsRecord. ClsRecord then inserts the formatted data into the "bigString"
beginning at StartPos. When clsRec has iterated all the clsFld instances in
the collection of clsFld, it is done with the record and has a "big string"
with data in specific places in "big string". clsRecord then hands that
string back to clsExport which is responsible for storing the "big string"
in a file out on disk. In fact clsExport sets up a clsLog when it opens,
with the path to the file to be created as well as the name - with date etc
in the name. clsLog is just called passing it "big String" and it logs the
string out on the disk file.
So... To summarize, clsExport instantiates clsRecord (one instance) which
loads as many instances of clsFld as are required to handle exactly and only
the fields in the FieldDef table that are marked "Active". Each clsFld
instance "knows how" to format data for one field. It knows the data type
coming in, the format string to get it in the desired format, the length of
the string that the formatted data is going in, whether it is left or right
justified etc.
ClsExport loads the recordset of data to be exported, calls clsRecord.Format
once for each record to export. clsRecord calls each clsFld.Format to get
each field's data formatted correctly, loads the formatted data into "big
string" and hands "big string" back to clsExport. clsExport hands BigString
off to clsLog which gets it into the file out on the disk.
One of the bigger issues I ran into was the "denormalized" data I had to
include. There are (for example) 1 to N "deductions" to be made from a
claim payment, and I had to get all such deductions out of a normalized
form, into a denormalized form, and then that denormalized data joined to my
main data record, and processed into the "Deduction1, Deduction2,
Deduction3..." fields in "big string". Thus I have an entire process that
looks at the deductions, the date windows that the deductions are valid
compared to the date window that the payments are for, and then flattens
them into a table. Obviously the client defined N fields for this data (20
it turns out) so I had to handle a maximum of 20 deductions and get them
flattened into a single deduction record to join back to the main claim
record being processed.
Obviously there is more, but that is the big picture and should be enough
for you to start thinking about how to do things using compartmentalized
code (classes). The format table is a nicety that allows me to make
modifications to the system quickly and easily as the client changes their
requirements.
In fact I am in the process of porting my system to VB.Net. This stuff is
just VB. It makes absolutely no use of Access' RAD or GUI stuff so there is
no reason it couldn't be done directly in VB or VB.Net. In fact Access is
less than robust in terms of its reliability as I have discovered with this
system. If I were you though I would think about doing yours in VB.Net
rather than VB6.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Nancy Lytle
Sent: Thursday, August 25, 2005 12:44 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have
>to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they
>are clueless as you might expect, and things move slowly. TWO years so
>far (and counting). They have even flopped back and forth between
>Fixed width and comma delimited (and back again). But... I design to
>allow me to just change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each field (start and stop bytes), the name of the field in MY
>application which maps to the field in THEIR application, the format
>string that makes it look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class
>system. Another class causes the data denormalization to occur, handles
>some details like checking that offsets (dates) fall within specific
>windows, pulls the data out of my query and hands it off to the field
>supervisor which hands each data piece to the appropriate "field class"
>which formats the field per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and
>a handful of modules. There is absolutely nothing trivial about doing
>this. The upside is that as the client comes back and says "no, move
>this field to here, left justify in the field instead of right, and oh,
>by the way it should have 4 decimal digits after the decimal point
>instead of two", I can just go into my definition table and make the
>appropriate changes, and the new report pops out as they request.
>Furthermore the process is broken down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not
>interfere". This is NOT an FE in the classic sense, it is a report
>generator / logger / sender application, which, just happens to be, in
>an FE (of its own). All of this is working at this point but it is
>written in VBA / Access FE container. I am looking at moving the
>entire thing to .Net, on my own dime, as an exercise in learning
>VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the
>scheduler part, what report is sent to whom, using what transmission
>method, at what time of the day/night, including / excluding holidays /
>weekends / custom schedule etc. The client wants it, and the client is
>willing to pay for it, so the client gets it. I am just examining my
>options for moving JUST THIS PIECE (since the whole thing is modular
>anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes
>from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Fri Aug 26 06:10:30 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 07:10:30 -0400
Subject: [dba-VB] DotNet passing by value
Message-ID: <021f01c5aa2e$c88d7b20$6c7aa8c0@ColbyM6805>
As you might be aware, VB.Net (and I assume the other .net languages as
well) pass all variables by value. But what does this mean, and is it true.
As you know, everything in .net is an object, even common variables such as
an integer or decimal etc. Passing by value (in other languages) means
placing a COPY of the variable (or object in this case) on the stack as the
function is called. In VBA for example, when you pass by value, it really
does ONLY for the simple data types, passing anything else (including
strings) by value.
Imagine passing a string, which could be a million bytes, by value -
literally making a copy and passing that into the stack. IIRC the total
stack space for a given program in an Intel machine is something like 128
kbytes which means that passing a single (huge) string by value could cause
a stack overflow. Now DotNet comes along claiming to pass everything by
value. Is this more doublespeak? And if so, what is the truth?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 07:38:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 08:38:40 -0400
Subject: [dba-VB] OT: FireFox not wrapping
Message-ID: <022401c5aa3b$19dacfd0$6c7aa8c0@ColbyM6805>
Does anyone know how to get firefox to wrap to the screen dimensions? I am
viewing MS pages which trail off to the side (have to use the slider) in FF
but wrap correctly in IE.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 08:15:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 09:15:02 -0400
Subject: [dba-VB] Passing null values to a function
Message-ID: <022701c5aa40$2dd57580$6c7aa8c0@ColbyM6805>
I have designed a class, with the New widget (constructor) having a set of
parameters, with the parameters type declared.
New(ByVal lintPKID As Int32, ByVal lstrForeignName As String, ByVal
lstrLocalName As String, _
ByVal lintLen As Int16, ByVal lintPosStart As Int16,
ByVal lintPosStop As Int16, _
ByVal lblnActive As Boolean, ByVal lblnCritical As
Boolean, _
ByVal lstrForeignDescr As String, ByVal lstrLocalDescr
As String, _
ByVal lstrFmt As String, ByVal lblnRightJustified As
Boolean, ByVal lstrNotes As String)
The problem I am running in to is that I am loading this stuff from a table.
I have a class that I initialize, which returns a data reader, and I take
the fields from the reader and pass the values in as follows:
Dim lclsData As clsData
Dim lDr As OleDbDataReader
lclsData = New clsData(lstrDataProvider, lstrDataSrc) 'Get an
instance of clsData
lclsData.pSQL = "SELECT * FROM " & lstrTblName & " WHERE ACTIVE =
True;" 'Set the SQL statement
If lclsData.mDrOpen() Then 'Open the reader
Dim lclsFld As clsFld 'dim a variable to hold clsFld instances
lDr = lclsData.pDR 'Get the data reader
While lDr.Read() 'Cycle through the field format records
'Loading the data from each field format record into the
clsFld instance
lclsFld = New clsFld(lDr("PKID"), lDr("ForeignFldName"),
lDr("LocalFldName"), _
lDr("Length"), lDr("PosStart"),
lDr("PosStop"), _
lDr("Active"), lDr("Critical"), _
lDr("ForeignDescr"),
lDr("LocalDescr"), _
lDr("Format"),
lDr("RightJustified"), lDr("Notes"))
The last line is pulling null values out of the "RightJustified" and "Notes"
fields and trying to pass them in. The program is throwing a runtime error
- "cast from type dbNull to type String not valid"
In this specific case I can go in and "fix" the source data but how do I
handle this if nulls are a valid possibility and I want them to be allowed
to be passed in? Do I need to change my parameter type to object (or
untyped)?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From bheid at appdevgrp.com Mon Aug 29 10:33:09 2005
From: bheid at appdevgrp.com (Bobby Heid)
Date: Mon, 29 Aug 2005 11:33:09 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
In-Reply-To: <916187228923D311A6FE00A0CC3FAA30C6DDF2@ADGSERVER>
Message-ID: <916187228923D311A6FE00A0CC3FAA30ABEEEA@ADGSERVER>
Cool! Thanks John.
Bobby
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 7:11 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
From fhtapia at gmail.com Mon Aug 29 13:25:16 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 11:25:16 -0700
Subject: [dba-VB] XML DOM to string?
Message-ID:
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Mon Aug 29 14:17:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Mon, 29 Aug 2005 15:17:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Francisco,
I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 2:25 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] XML DOM to string?
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Mon Aug 29 15:32:24 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 13:32:24 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID:
Well I need the XML formated in the way I metioned earlier, that's
because I then make a call to a soap object in which it calls a PICK
database (Unidata) to deliver an order. Originally I had a For XML
call from sql server but I was not able to take that result and stuff
it into a variable, so I did it in VB, I have a class that I use to
create the xml as previously listed, so I finished my document, but
wanted to simply make the soap call when I realized that this was an
object and not a string, thus it wasn't gonna work. My current
solution is to save it temporarily to the disk and re-read it back to
a string variable as a text file using LOF, it works fine, and on my
system is actually really quick, but it was just a bother.
On 8/29/05, Jim DeMarco wrote:
> Francisco,
>
> I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 2:25 PM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] XML DOM to string?
>
>
> I'm messing around w/ XML and it's quite late I suppose since there
> really is so much I do not know... what I'm trying to do, I have a
> class that I use to create a complex XML, that is:
>
> I can save my xmldom object down to a file, but then I'd have to
> re-open it and read it all back into a string, and I wondered since
> it's in memory if I can just somehow save it to a string instead...
> any clues?
> Thanks
>
>
> WSOrder>
> -
> FO440
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> -
> 93-1000
> 10
> 21222
>
> -
> 22-2222
> 5
> 50101
>
> -
> 33-3333
> 33
> 696969
>
>
>
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From martyconnelly at shaw.ca Mon Aug 29 17:37:33 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Mon, 29 Aug 2005 15:37:33 -0700
Subject: [dba-VB] XML DOM to string?
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID: <43138E2D.1060204@shaw.ca>
Why not grab the intial html string returned down the wire by the soap
call before you place it in the xmldom.
It would look something like this. Just strip off the envelope xml code
and use the soap body.
Assuming you are using xmlhttp it would be contained in
XMLHTTP.responseXML.xml
rather than XMLHTTP.responseText.
00000-0000
Francisco Tapia wrote:
>Well I need the XML formated in the way I metioned earlier, that's
>because I then make a call to a soap object in which it calls a PICK
>database (Unidata) to deliver an order. Originally I had a For XML
>call from sql server but I was not able to take that result and stuff
>it into a variable, so I did it in VB, I have a class that I use to
>create the xml as previously listed, so I finished my document, but
>wanted to simply make the soap call when I realized that this was an
>object and not a string, thus it wasn't gonna work. My current
>solution is to save it temporarily to the disk and re-read it back to
>a string variable as a text file using LOF, it works fine, and on my
>system is actually really quick, but it was just a bother.
>
>On 8/29/05, Jim DeMarco wrote:
>
>
>>Francisco,
>>
>>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>>
>>Jim DeMarco
>>
>>-----Original Message-----
>>From: dba-vb-bounces at databaseadvisors.com
>>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
>>Sent: Monday, August 29, 2005 2:25 PM
>>To: dba-vb at databaseadvisors.com
>>Subject: [dba-VB] XML DOM to string?
>>
>>
>>I'm messing around w/ XML and it's quite late I suppose since there
>>really is so much I do not know... what I'm trying to do, I have a
>>class that I use to create a complex XML, that is:
>>
>>I can save my xmldom object down to a file, but then I'd have to
>>re-open it and read it all back into a string, and I wondered since
>>it's in memory if I can just somehow save it to a string instead...
>>any clues?
>>Thanks
>>
>>
>>WSOrder>
>>-
>> FO440
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>-
>>-
>> 93-1000
>> 10
>> 21222
>>
>>-
>> 22-2222
>> 5
>> 50101
>>
>>-
>> 33-3333
>> 33
>> 696969
>>
>>
>>
>>
>>
>>--
>>-Francisco
>>http://pcthis.blogspot.com |PC news with out the jargon!
>>http://sqlthis.blogspot.com | Tsql and More...
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>***********************************************************************************
>>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
>>***********************************************************************************
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From fhtapia at gmail.com Mon Aug 29 22:38:25 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 20:38:25 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <43138E2D.1060204@shaw.ca>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
<43138E2D.1060204@shaw.ca>
Message-ID:
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 06:58:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 07:58:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Would using the FileSystemObject and opening a TextStream help at all?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 11:38 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
Well the order starts as an XML string received from an online order,
this is captured and imported to a table that temorarily holds the
order as a pending order. This gets approved by our service dept.,
but at this time I need to take the tablized data and re-convert it to
xml, since the data is on the back end (sql server) I initially
created an "For XML" query, but that proved to be of much use even tho
it was formated correctly. I then converted the recordset using MSXML
(dom) object. This works and was the sample xml format I posted
earlier. I wanted to just pass the dom object, but my sql server wich
makes the soap call takes a string object instead, I thought of just
calling the soap object from Access, but instead went ahead and did it
via sql server, reason for it is that I can save a round trip by
calling the sql server and having sql server update the local tables
instead of pushing data via the client once more...
What I did to make the xml object a string, was to save it as an .xml
file, I then re-open the file w/ an Open file for input standard text
procedure and read the entire file to a string...
i just wondered if at least for the last step i could avoid hitting
the disk, but i think it doesnt' really matter after all this hoop
jumping ;)
On 8/29/05, MartyConnelly wrote:
> Why not grab the intial html string returned down the wire by the soap
> call before you place it in the xmldom.
> It would look something like this. Just strip off the envelope xml code
> and use the soap body.
> Assuming you are using xmlhttp it would be contained in
> XMLHTTP.responseXML.xml
> rather than XMLHTTP.responseText.
>
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> 00000-0000
>
>
>
>
>
>
> Francisco Tapia wrote:
>
> >Well I need the XML formated in the way I metioned earlier, that's
> >because I then make a call to a soap object in which it calls a PICK
> >database (Unidata) to deliver an order. Originally I had a For XML
> >call from sql server but I was not able to take that result and stuff
> >it into a variable, so I did it in VB, I have a class that I use to
> >create the xml as previously listed, so I finished my document, but
> >wanted to simply make the soap call when I realized that this was an
> >object and not a string, thus it wasn't gonna work. My current
> >solution is to save it temporarily to the disk and re-read it back to
> >a string variable as a text file using LOF, it works fine, and on my
> >system is actually really quick, but it was just a bother.
> >
> >On 8/29/05, Jim DeMarco wrote:
> >
> >
> >>Francisco,
> >>
> >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> >>
> >>Jim DeMarco
> >>
> >>-----Original Message-----
> >>From: dba-vb-bounces at databaseadvisors.com
> >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> >>Sent: Monday, August 29, 2005 2:25 PM
> >>To: dba-vb at databaseadvisors.com
> >>Subject: [dba-VB] XML DOM to string?
> >>
> >>
> >>I'm messing around w/ XML and it's quite late I suppose since there
> >>really is so much I do not know... what I'm trying to do, I have a
> >>class that I use to create a complex XML, that is:
> >>
> >>I can save my xmldom object down to a file, but then I'd have to
> >>re-open it and read it all back into a string, and I wondered since
> >>it's in memory if I can just somehow save it to a string instead...
> >>any clues?
> >>Thanks
> >>
> >>
> >>WSOrder>
> >>-
> >> FO440
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>-
> >> 93-1000
> >> 10
> >> 21222
> >>
> >>-
> >> 22-2222
> >> 5
> >> 50101
> >>
> >>-
> >> 33-3333
> >> 33
> >> 696969
> >>
> >>
> >>
> >>
> >>
> >>--
> >>-Francisco
> >>http://pcthis.blogspot.com |PC news with out the jargon!
> >>http://sqlthis.blogspot.com | Tsql and More...
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>***********************************************************************************
> >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> >>***********************************************************************************
> >>
> >>_______________________________________________
> >>dba-VB mailing list
> >>dba-VB at databaseadvisors.com
> >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> >>http://www.databaseadvisors.com
> >>
> >>
> >>
> >>
> >
> >
> >
> >
>
> --
> Marty Connelly
> Victoria, B.C.
> Canada
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Tue Aug 30 07:58:37 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Tue, 30 Aug 2005 05:58:37 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D28@TTNEXCHCL2.hshhp.com>
Message-ID:
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:33:54 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:33:54 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D2F@TTNEXCHCL2.hshhp.com>
Francisco,
Here's some VB 6 code that will return the XML without the need to write to a file.
HTH,
Jim DeMarco
=============================
Public Function MyXMLString() As String
Dim oXML As MSXML2.DOMDocument30
Dim oElement As IXMLDOMElement
Const FILE_NOT_FOUND_ERROR = 53
Set oXML = New DOMDocument30
oXML.async = False
'
If Len(Dir("c:\test.xml")) = 0 Then
Err.Raise FILE_NOT_FOUND_ERROR, "MyTest:MyXMLString", Err.Description
End If
oXML.Load "c:\test.xml"
If oXML.parseError.errorCode <> 0 Then
Err.Raise oXML.parseError.errorCode, "MyTest:MyXMLString", oXML.parseError.reason
End If
Set oElement = oXML.documentElement
MyXMLString = oElement.xml
End Function
Private Sub Form_Load()
Debug.Print MyXMLString
End Sub
=============================
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From Jdemarco at hudsonhealthplan.org Tue Aug 30 08:35:22 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Tue, 30 Aug 2005 09:35:22 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D30@TTNEXCHCL2.hshhp.com>
Sorry I should have mentioned that even though I opened a file to get the XML for the example I just posted you can do the same with a DOM object already loaded in memory.
Jim D.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Tuesday, August 30, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] XML DOM to string?
more info:, the online ordering system is a dot net application, it
calls a webservice that I created using the SQLXML 3.0, that was quite
easy and fun, the xml document is sent as a parameter string to me via
that webservice to a stored procedure which uses openxml to place into
tables, the front end application reads the data in the tables to let
users know that there are new orders, they open up he order as they
normally would for editing via the Access Interface. when the order
is complete I then create a new xml copy of the order, because I now
need to transfer the order to our enterprise system, the method is via
soap call, because the enterprise system is in unidata, (odbc has been
proven to be too slow and unreliable in context to our unidata
system). so using the ms dom object I re-create the xml document at
the client side to leverage my use of cpu cycles, but, i thought I
could just send the dom as a string instead of an object since the
stored procedure in sql server's parameter takes a string, not an
object.. so to create the string from the dom I just do the following,
first save the dom as an xml, then read it back in as so.
Dim strBuff As String
Open "c:\temp\123.xml" For Input As #1
strBuff = Input(LOF(1), 1)
Close #1
I was hoping that maybe I didn't need to save the .xml file first and
maybe I missed a property in the dom object.
On 8/30/05, Jim DeMarco wrote:
> Would using the FileSystemObject and opening a TextStream help at all?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 11:38 PM
> To: dba-vb at databaseadvisors.com
> Subject: Re: [dba-VB] XML DOM to string?
>
>
> Well the order starts as an XML string received from an online order,
> this is captured and imported to a table that temorarily holds the
> order as a pending order. This gets approved by our service dept.,
> but at this time I need to take the tablized data and re-convert it to
> xml, since the data is on the back end (sql server) I initially
> created an "For XML" query, but that proved to be of much use even tho
> it was formated correctly. I then converted the recordset using MSXML
> (dom) object. This works and was the sample xml format I posted
> earlier. I wanted to just pass the dom object, but my sql server wich
> makes the soap call takes a string object instead, I thought of just
> calling the soap object from Access, but instead went ahead and did it
> via sql server, reason for it is that I can save a round trip by
> calling the sql server and having sql server update the local tables
> instead of pushing data via the client once more...
>
> What I did to make the xml object a string, was to save it as an .xml
> file, I then re-open the file w/ an Open file for input standard text
> procedure and read the entire file to a string...
>
> i just wondered if at least for the last step i could avoid hitting
> the disk, but i think it doesnt' really matter after all this hoop
> jumping ;)
>
> On 8/29/05, MartyConnelly wrote:
> > Why not grab the intial html string returned down the wire by the soap
> > call before you place it in the xmldom.
> > It would look something like this. Just strip off the envelope xml code
> > and use the soap body.
> > Assuming you are using xmlhttp it would be contained in
> > XMLHTTP.responseXML.xml
> > rather than XMLHTTP.responseText.
> >
> >
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> > 00000-0000
> >
> >
> >
> >
> >
> >
> > Francisco Tapia wrote:
> >
> > >Well I need the XML formated in the way I metioned earlier, that's
> > >because I then make a call to a soap object in which it calls a PICK
> > >database (Unidata) to deliver an order. Originally I had a For XML
> > >call from sql server but I was not able to take that result and stuff
> > >it into a variable, so I did it in VB, I have a class that I use to
> > >create the xml as previously listed, so I finished my document, but
> > >wanted to simply make the soap call when I realized that this was an
> > >object and not a string, thus it wasn't gonna work. My current
> > >solution is to save it temporarily to the disk and re-read it back to
> > >a string variable as a text file using LOF, it works fine, and on my
> > >system is actually really quick, but it was just a bother.
> > >
> > >On 8/29/05, Jim DeMarco wrote:
> > >
> > >
> > >>Francisco,
> > >>
> > >>I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
> > >>
> > >>Jim DeMarco
> > >>
> > >>-----Original Message-----
> > >>From: dba-vb-bounces at databaseadvisors.com
> > >>[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> > >>Sent: Monday, August 29, 2005 2:25 PM
> > >>To: dba-vb at databaseadvisors.com
> > >>Subject: [dba-VB] XML DOM to string?
> > >>
> > >>
> > >>I'm messing around w/ XML and it's quite late I suppose since there
> > >>really is so much I do not know... what I'm trying to do, I have a
> > >>class that I use to create a complex XML, that is:
> > >>
> > >>I can save my xmldom object down to a file, but then I'd have to
> > >>re-open it and read it all back into a string, and I wondered since
> > >>it's in memory if I can just somehow save it to a string instead...
> > >>any clues?
> > >>Thanks
> > >>
> > >>
> > >>WSOrder>
> > >>-
> > >> FO440
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>-
> > >>-
> > >> 93-1000
> > >> 10
> > >> 21222
> > >>
> > >>-
> > >> 22-2222
> > >> 5
> > >> 50101
> > >>
> > >>-
> > >> 33-3333
> > >> 33
> > >> 696969
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>--
> > >>-Francisco
> > >>http://pcthis.blogspot.com |PC news with out the jargon!
> > >>http://sqlthis.blogspot.com | Tsql and More...
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>***********************************************************************************
> > >>"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> > >>***********************************************************************************
> > >>
> > >>_______________________________________________
> > >>dba-VB mailing list
> > >>dba-VB at databaseadvisors.com
> > >>http://databaseadvisors.com/mailman/listinfo/dba-vb
> > >>http://www.databaseadvisors.com
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >
> >
> > --
> > Marty Connelly
> > Victoria, B.C.
> > Canada
> >
> >
> >
> > _______________________________________________
> > dba-VB mailing list
> > dba-VB at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-vb
> > http://www.databaseadvisors.com
> >
> >
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From listmaster at databaseadvisors.com Wed Aug 31 08:21:41 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Wed, 31 Aug 2005 09:21:41 -0400
Subject: [dba-VB] Administrivia - List Software Upgrade - Sep 4
Message-ID: <431576A5.23677.326CD85@listmaster.databaseadvisors.com>
The software that runs our list has released a new version to fix
some security issues, add some new features to help out the admins
and mods and some bug fixes.
So I will be upgrading the software on Sunday Sep 4. This will mean
the lists will be down starting at 10am (EDT - UTC -0400) on Sunday
Set 4. If the previous upgrades are any indication, they will be down
for less than 1/2 hour. So there won't be much disruption.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
Failure is not an option. It comes bundled with the software.
From jwcolby at colbyconsulting.com Wed Aug 3 22:08:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:08:40 -0400
Subject: [dba-VB] Inheriting collections
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007b01c598a1$d0afdcb0$6c7aa8c0@ColbyM6805>
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 3 22:11:08 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:11:08 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
Has anyone seen anything indicating the relative speed between "identical
code" in these two languages? I went looking for a way to test .net code
and promptly got bogged down in issues like data collection distorting the
numbers etc. I'm just wondering if anyone has a feel for the relative
speeds? Similar, very different?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Wed Aug 3 22:21:33 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Thu, 04 Aug 2005 13:21:33 +1000
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <007c01c598a2$28925610$6c7aa8c0@ColbyM6805>
References: <000101c5916f$10e38230$6c7aa8c0@ColbyM6805>
Message-ID: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between "identical
> code" in these two languages? I went looking for a way to test .net code
> and promptly got bogged down in issues like data collection distorting the
> numbers etc. I'm just wondering if anyone has a feel for the relative
> speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From jwcolby at colbyconsulting.com Wed Aug 3 22:41:18 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 03 Aug 2005 23:41:18 -0400
Subject: [dba-VB] Speed - vb.net vs vba
In-Reply-To: <42F2165D.18011.150FDE8A@stuart.lexacorp.com.pg>
Message-ID: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Yea I read that, but that is vb not vba.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, August 03, 2005 11:22 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Speed - vb.net vs vba
On 3 Aug 2005 at 23:11, John W. Colby wrote:
> Has anyone seen anything indicating the relative speed between
> "identical code" in these two languages? I went looking for a way to
> test .net code and promptly got bogged down in issues like data
> collection distorting the numbers etc. I'm just wondering if anyone
> has a feel for the relative speeds? Similar, very different?
>
Try
http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Thu Aug 4 01:09:50 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 03 Aug 2005 23:09:50 -0700
Subject: [dba-VB] Speed - vb.net vs vba
References: <007d01c598a6$62a5e700$6c7aa8c0@ColbyM6805>
Message-ID: <42F1B12E.4020904@shaw.ca>
Well I could show you how to write direct Intel Machine OpCode via DOS
copy con: c:\temp\myprog.exe
No assembler no nothing, but would you want to do it.
Most speed can be gained by proper algorithms at times compilers can be
irrelevant
http://www.xbeat.net/vbspeed/index.htm
John W. Colby wrote:
>Yea I read that, but that is vb not vba.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
>Sent: Wednesday, August 03, 2005 11:22 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] Speed - vb.net vs vba
>
>
>On 3 Aug 2005 at 23:11, John W. Colby wrote:
>
>
>
>>Has anyone seen anything indicating the relative speed between
>>"identical code" in these two languages? I went looking for a way to
>>test .net code and promptly got bogged down in issues like data
>>collection distorting the numbers etc. I'm just wondering if anyone
>>has a feel for the relative speeds? Similar, very different?
>>
>>
>>
>
>Try
>http://visualbasic.about.com/od/imhoinmyhumbleopinion/ss/VB6VSVBNET.htm
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From Jdemarco at hudsonhealthplan.org Thu Aug 4 07:00:13 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Thu, 4 Aug 2005 08:00:13 -0400
Subject: [dba-VB] Inheriting collections
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
I was pretty busy at the time of your original post but a quick take would be that inheriting from a collection will help keep your syntax a bit cleaner:
objSysVarTbl.CollectionMethod
objSysVarTbl.CollectionObject.CollectionMethod
HTH
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Wednesday, August 03, 2005 11:09 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Inheriting collections
No thoughts on this subject?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Monday, July 25, 2005 7:18 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Inheriting collections
Being new to this inheritance thing (in the last 15 years), I have a
conceptual question:
In my SysVarRec I use a data class (or structure) that holds one record's
worth of SysVar data from a specific table. I use a SysVarsTbl class that
holds a collection of SysVarRec instances. This class loads all of the
sysvar records from a single table, loading each record's data into a
SysVarRec class or structure. I use a SysVars class which loads one or more
instances of SysVarsTbl, storing each SysVarsTbl class into a collection.
ADDITIONALLY, this class then merges all of the SysVarsTbl class' data into
a single collection of SysVars. This collection is nothing more than a
keyed collection, where the value is stored, with a key to index into the
collection. The objective here is to allow several different copies of a
SysVars table to exist, where the "last loaded wins".
For example, suppose I have a SysVar called EnableZip, whose value is
True/False. If True the Zip functionality is loaded as the framework sets
up. In the framework's copy of tblSysVars, EnableZip exists but is set to
false. Thus as the framework initializes, the zip functionality is not
loaded. In the application's copy of tblSysVars, EnableZip is True because
this application needs to zip files. The tables load Framework.tblSysVar
and then Application.tblSysVars. EnableZip=false loads from the framework
table, but then the EnableZip=True loads from the application table loads
and "overrides" the framework's SysVar. What really happens is that the
EnableZip is found already loaded and changed from False to True. Thus by
the time the application table finishes loading, EnableZip is True and the
zip functionality of the framework loads.
Well, you get the idea anyway. Think up your own scenario.
The question now is...
Since a class can be inherited, should SysVarsTbl inherit the collection
class so that all of the collection functionality is native to the
SysVarsTbl class? Or should the SysVarsTbl class simply have a collection
class variable that it sets up and loads an instance of the collection
class? IOW, SysVarsTbl needs a collection but it could BE a collection or
it could just dim and use a collection.
VBA did not have this ability, so I became accustomed to just "consuming"
collections, i.e. using them. But now the class that needs a collection
could BE a collection class, with all of the functionality of the collection
class inherited right in and specific non-collection functionality added to
it (loading records out of a table for example).
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From jwcolby at colbyconsulting.com Tue Aug 9 13:04:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 14:04:22 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3C35@TTNEXCHCL2.hshhp.com>
Message-ID: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Tue Aug 9 14:04:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Tue, 9 Aug 2005 15:04:49 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 16:17:41 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 17:17:41 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To:
Message-ID: <008601c59d27$c6b8c390$6c7aa8c0@ColbyM6805>
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 9 18:24:57 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 09 Aug 2005 19:24:57 -0400
Subject: [dba-VB] Running an application from a service - DotNet
In-Reply-To: <007b01c59d0c$c9bde180$6c7aa8c0@ColbyM6805>
Message-ID: <008701c59d39$91847180$6c7aa8c0@ColbyM6805>
This is what I found for doing this:
System.Diagnostics.Process.Start("notepad.exe","sample.txt");
>From this article:
http://www.dotnetbips.com/51AA8C48-7DD4-416B-A9D2-63C26644C120.aspx?articlei
d=28
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks every
X seconds/minutes/hours. It is writing to the Application Event Log so I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I will
need to run that application at a specific time of day so I need my service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 10 06:10:42 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 10 Aug 2005 07:10:42 -0400
Subject: [dba-VB] Running an application from a service - DotNet
Message-ID:
I'm not sure that you have to be logged in. But I am using it on Windows
2003 Server under the administrator account.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 5:18 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
AFAIK, you have to be logged in for that to work.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Tuesday, August 09, 2005 3:05 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an application from a service - DotNet
John,
I do this using Windows built in scheduler. No service needed.
Start|All Programs|Accessories|System Tools|Scheduled Tasks
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 09, 2005 2:04 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Running an application from a service - DotNet
VB.Net - I have successfully created a service with a timer that ticks
every
X seconds/minutes/hours. It is writing to the Application Event Log so
I
can see that the tick is happening.
Now I need that service to now run an "external" application, i.e. (for
example) run an Access application, etc.
Does anyone have any experience with doing this?
My next step is to create a VB.Net application that pulls data out of a
table and turns it into a CSV file, marking the records as exported. I
will
need to run that application at a specific time of day so I need my
service
to run this program.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From listmaster at databaseadvisors.com Sun Aug 14 08:50:58 2005
From: listmaster at databaseadvisors.com (Bryan Carbonnell)
Date: Sun, 14 Aug 2005 09:50:58 -0400
Subject: [dba-VB] Administrivia - Lists Temporarily Down
Message-ID: <42FF1402.5531.150D8B@listmaster.databaseadvisors.com>
The company that hosts our lists will be doing some maintenance on
their network from 11PM Aug 16 to 6 AM Aug 17 CST (04:00 to 11:00 on
Aug 17 UTC - http://www.timezoneconverter.com/cgi-bin/tzc.tzc to find
out what time it is in your timezone))
They are upgrading their core routers, which will cause dba's list,
and associated web pages (not the Website, but the list pages,
including archives) to be down, anywhere from a few minutes to an
hour.
Hopefully this does not cause anyone too much of an inconvenience.
--
Bryan Carbonnell - listmaster at databaseadvisors.com
If you can't be a good example, then you'll just have to be a
horrible warning.
From R.Griffiths at bury.gov.uk Tue Aug 16 10:46:56 2005
From: R.Griffiths at bury.gov.uk (Griffiths, Richard)
Date: Tue, 16 Aug 2005 16:46:56 +0100
Subject: [dba-VB] Update BE
Message-ID: <200508161536.j7GFan926891@smarthost.yourcomms.net>
Hi
After advice/resources.
I have written an application using vb.net which is to run with A2K BE
and SQL 2000 BE.
I am trying to think about how to update the back end. I have a number
of options, one being to write VB code and using DAO or ADO update the
BE. But I think this will involve further deployment of VB and Jet/Vba
and MS Access (runtime) etc.
The other option (no doubt there are others) is to write CREATE TABLE
and ALTER TABLE statements (and this can be deployed within a exe
running vb.net). I think this is tidier, however there is not much
documentation on this process ( CREATE TABLE and ALTER TABLE etc) for MS
Access. Does anyone have code and/or can offer good sources on the web
to help me here. Any other solutions?
Many thanks
Richard
From jwcolby at colbyconsulting.com Thu Aug 18 10:32:27 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:32:27 -0400
Subject: [dba-VB] Running an app from a service
Message-ID: <011101c5a40a$0d5a3110$6c7aa8c0@ColbyM6805>
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Thu Aug 18 10:37:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:37:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 10:59:14 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 11:59:14 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA4@main2.marlow.com>
Message-ID: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 10:58:03 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 10:58:03 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Right you are. I read that somewhere, but forgot about it.
And Voila, it opens Notepad visible.
OK, maybe YOU are the master...
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:37 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
It's not visible because NT Services do not interact with the desktop. You
can set a service to be interactive though. Haven't done an NT service in
.Net, but when the service is registered with the OS, just go into the
service properties, and the Log On tab, and put a checkbox in 'Allow service
to interact with desktop'.
Just a note, if you are using a specific account to run the service as
(which is required if you are going to try and hit network resources that
require authentication), this option will not be available, since it is only
for running as the Local System account.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 10:32 AM
To: 'Access Developers discussion and problem solving'; VBA
Subject: [dba-VB] Running an app from a service
I have created a service using VB.Net. The service can be registered, once
registered I can start it etc. It runs, with a timer tick writing a log to
application.log so I can see that the timer tick is happening. Once I got
that working I went looking for how to run an external application from the
service. The code I found looks like:
Dim p As System.Diagnostics.Process
p = System.Diagnostics.Process.Start("notepad.exe", "sample.txt")
p.WaitForExit()
A couple of things. Notepad is running, it can bee seen as a process in
Task Manager, but it is not visible, and it has not created sample.txt
AFAICT. I found other code (in C# unfortunately) that looks something like:
Dim p As System.Diagnostics.Process
Dim psi As System.Diagnostics.ProcessStartInfo
psi = System.Diagnostics.ProcessStartInfo
psi.FileName = "notepad.exe"
psi.Arguments = "sample.txt"
psi.WorkingDirectory = "x:\Luminex"
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized
p = System.Diagnostics.Process.Start(psi)
p.WaitForExit()
PSI appears to be a structure for loading properties that P will use.
Even when done this way, the notepad is not visible. Furthermore, in either
case the code does not wait... Or maybe the timer spawns a thread and will
fire again spawning another thread. In other words, next timer tick I get
another instance of Notepad. However... If I place a line of code that
writes to the log file before and after the call to the sub that opens
notebook, the line before the call to open the notepad does log, the line
after does not log.
So, I do not understand all that I know about this stuff. If anyone has any
ideas how to make the process visible I would appreciate it. I also do need
the code not run again until the app shuts down. I think I can just shut
off the timer so I can handle it that way if the timer will fire again even
if the p.WaitFor() is in place.
Any comments? Has anyone done this?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:11:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:11:28 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDA8@main2.marlow.com>
Message-ID: <011901c5a40f$7d2e05c0$6c7aa8c0@ColbyM6805>
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
From DWUTKA at marlow.com Thu Aug 18 11:14:23 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 11:14:23 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
LOL. Jack of all trades, master of none! ;)
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 11:11 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
That is one of the joys and frustrations of programming. We all get to be
the Master at what we do every day, and we all have areas where we know next
to nothing.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 11:58 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. I just do so much tech support outside of programming, that when it
comes to coding AND Windows related stuff, I have a pretty good grasp on it.
Heck, I have more VB 6.0 NT services in place here at work, then I have
Access .mdb's being used as a front end. (By a factor of close to 10, I'm
sure....)
Drew
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 11:38:24 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 12:38:24 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
Message-ID: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
I prefer to be Jack of all trades, master of one.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 12:14 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
LOL. Jack of all trades, master of none! ;)
Drew
From carbonnb at gmail.com Thu Aug 18 13:30:45 2005
From: carbonnb at gmail.com (Bryan Carbonnell)
Date: Thu, 18 Aug 2005 14:30:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
References: <123701F54509D9119A4F00D0B747349016DDAA@main2.marlow.com>
<011b01c5a413$40c20c40$6c7aa8c0@ColbyM6805>
Message-ID:
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
From DWUTKA at marlow.com Thu Aug 18 13:33:11 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 13:33:11 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well
preserved body, but rather to skid in sideways, totally worn out,
shouting "What a great ride!"
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:01:12 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:01:12 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To:
Message-ID: <011f01c5a427$36fbab30$6c7aa8c0@ColbyM6805>
ROTFL. It changes year to year. And of course I get a LOT of arguments
whether I am even an apprentice at anything.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell
Sent: Thursday, August 18, 2005 2:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:02:15 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:02:15 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDB2@main2.marlow.com>
Message-ID: <012001c5a427$5e1213d0$6c7aa8c0@ColbyM6805>
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 14:13:46 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:13:46 -0400
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
Message-ID: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Thu Aug 18 14:21:28 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 15:21:28 -0400
Subject: [dba-VB] NSpring
Message-ID: <012401c5a42a$0bdcab40$6c7aa8c0@ColbyM6805>
Has anyone looked at / evaluated / used Nspring -
http://sourceforge.net/projects/nspring
I am in need of a good logger, and I use collections a LOT in my programming
so this also looks promising on that front. I understand that I can just
reference the project from my code so it should not matter too much that I
choose VB.Net and this stuff is in C#, correct?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From ridermark at gmail.com Thu Aug 18 14:26:17 2005
From: ridermark at gmail.com (Mark Rider)
Date: Thu, 18 Aug 2005 14:26:17 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
In-Reply-To: <012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
References: <011601c5a40d$cbe379e0$6c7aa8c0@ColbyM6805>
<012201c5a428$f4cf4a80$6c7aa8c0@ColbyM6805>
Message-ID:
In the registry under HKCU\Software\Microsoft\VisualStudio\7.1 there
is a ProjectMRUList key and a FileMRUList key. Deleting the strings
in there will clear it all out.
May be a bit heavy handed, but that is the only way I have found to do it.
--
Mark Rider
http://commonsensesecurity.info
There are 10 kinds of people in the world:
Those who understand binary and those who don't.
From DWUTKA at marlow.com Thu Aug 18 17:25:42 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:25:42 -0500
Subject: [dba-VB] Running an app from a service
Message-ID: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Thu Aug 18 17:26:12 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Thu, 18 Aug 2005 17:26:12 -0500
Subject: [dba-VB] Clearing the history list in .net IDE
Message-ID: <123701F54509D9119A4F00D0B747349016DDC3@main2.marlow.com>
I would guess it's in the registry.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:14 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] Clearing the history list in .net IDE
Can anyone tell me how to clear the history list in the IDE for the various
flavors of .net languages. When I say "open project" I am presented with a
long list of the various failures... uhhh... projects I created on the way
to becoming only slightly knowledgeable. It would be good for the ego to
get rid of these old "projects" from the list. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 17:58:45 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 18:58:45 -0400
Subject: [dba-VB] Running an app from a service
In-Reply-To: <123701F54509D9119A4F00D0B747349016DDC2@main2.marlow.com>
Message-ID: <012701c5a448$6843edd0$6c7aa8c0@ColbyM6805>
Uh..no, psycho maybe.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 6:26 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
So now you're psychic? LOL!
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, August 18, 2005 2:02 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Yea, but you were THINKING it. I could hear the guffaws echoing out of
Texas.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Thursday, August 18, 2005 2:33 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Running an app from a service
Hey, I didn't say that........please take note of that JC. ;)
Drew
-----Original Message-----
From: Bryan Carbonnell [mailto:carbonnb at gmail.com]
Sent: Thursday, August 18, 2005 1:31 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Running an app from a service
On 18/08/05, John W. Colby wrote:
> I prefer to be Jack of all trades, master of one.
And that one would be???
--
Bryan Carbonnell - carbonnb at gmail.com
Life's journey is not to arrive at the grave safely in a well preserved
body, but rather to skid in sideways, totally worn out, shouting "What a
great ride!" _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Thu Aug 18 20:57:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 21:57:47 -0400
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From stuart at lexacorp.com.pg Thu Aug 18 21:39:05 2005
From: stuart at lexacorp.com.pg (Stuart McLachlan)
Date: Fri, 19 Aug 2005 12:39:05 +1000
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305D2E9.11360.31C0985@stuart.lexacorp.com.pg>
On 18 Aug 2005 at 21:57, John W. Colby wrote:
....
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
>
.....
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
Do you have an SMTP server running on your local machine?
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas?
Not really, but SMTP certainly shouldn't be going anywhere near anything
called ".web.http....."
If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
Try Blat.DLL from http://www.geocities.com/toby_korn/blat/
It's easy to use and I can talk you through it if you run into problems.
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
From ebarro at afsweb.com Thu Aug 18 21:54:34 2005
From: ebarro at afsweb.com (Eric Barro)
Date: Thu, 18 Aug 2005 19:54:34 -0700
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID:
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook.
I found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document, previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in respect of such communication.
From jwcolby at colbyconsulting.com Thu Aug 18 22:08:35 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 18 Aug 2005 23:08:35 -0400
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To:
Message-ID: <013101c5a46b$4cabf180$6c7aa8c0@ColbyM6805>
I am attempting to create a system that will take data from a database,
export it into a text file, then send that file as an attachment to an email
to an insurance company. Later I will need to get an FTP channel going to
send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
just have DotNet directly send the email.
My home office is connected to the internet via the cable company. They do
port 25 blocking, forcing me to send to their SMTP server (from here at my
office). It was for that reason that I sent to mail.optonline.com, as that
is the SMTP server address used by my Outlook (from my home office). I am
actually in the process of switching to a new hosting company that will
allow me to use an alternate port to transmit email. That will still
require me to hit that company's SMTP server, but at least I can send from
anywhere I may be working to the same SMTP address. As it currently stands,
I have to constantly futz with the SMTP server address as I move my laptop
from my home to my client to my sister-in-law etc. All three of those
locations goes through a ISP that performs port 25 blocking.
Anyway.....
I am trying to set up email for my vb.net program. It would be nice if it
just worked, from wherever I plopped it down. And, of course, I do not
understand anything about email, SMTP servers, or even vb.net. I guess that
would make me jack of all trades... ;-) Or at least master of none of
these.
Someday I hope to be able to say I at least understand the vb.net part.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: Thursday, August 18, 2005 10:55 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] Smtp mail from vb.net
If you are trying to send via mail.optonline.com and it resolves to one of
your machines on the internal network it won't work. Try using localhost
which resolves to 127.0.0.1 (assuming that the mail server is your local
machine) or the internal IP of the smtp server.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Thursday, August 18, 2005 6:58 PM
To: VBA
Subject: [dba-VB] Smtp mail from vb.net
I'm trying to get .net to send email for me without going through Outlook. I
found the following on the web:
Imports System.Web.Mail
Imports System.IO
Module basMail
'TWO FUNCTIONS
'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
'ATTACHMENTS
'FROM: Email address FRom
'TO: EMAIL address To
'Subject: Subject; Body: MessageText
'Optional CC, BCC: CC and bcc recipients
'SMTPSERVER: Optional, if not specified
'local machine is used
'AttachmentFile (first function: Optional, file name)
'AttachmentFiles (second function: Optional, list of
'attachments in form of an array list)
Public Sub SendMailOneAttachment(ByVal From As String, _
ByVal sendTo As String, ByVal Subject As String, _
ByVal Body As String, _
Optional ByVal AttachmentFile As String = "", _
Optional ByVal CC As String = "", _
Optional ByVal BCC As String = "", _
Optional ByVal SMTPServer As String = "Mail.optonline.com")
Dim myMessage As MailMessage
Try
myMessage = New MailMessage()
With myMessage
.To = sendTo
.From = From
.Subject = Subject
.Body = Body
.BodyFormat = MailFormat.Text
'CAN USER MAILFORMAT.HTML if you prefer
If CC <> "" Then .Cc = CC
If BCC <> "" Then .Bcc = ""
If FileExists(AttachmentFile) Then _
.Attachments.Add(AttachmentFile)
End With
If SMTPServer <> "" Then _
SmtpMail.SmtpServer = SMTPServer
SmtpMail.Send(myMessage)
Catch myexp As Exception
Throw myexp
End Try
End Sub
When I call the function not passing in an smtp server, nothing obvious
happens, no exception thrown. No email is delivered to my mail box though.
If I pass in mySMTP server for outlook mail.optonline.com, it throws an
error "system.web.httpexception - could not access cdo.message object".
Any ideas? If not does anyopne have a drop in function for sending email
that they can walk me through using??
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
----------------------------------------------------------------
The information contained in this e-mail message and any file, document,
previous e-mail message and/or attachment transmitted
herewith is confidential and may be legally privileged. It is intended
solely for the private use of the addressee and must not be
disclosed to or used by anyone other than the addressee. If you receive this
transmission by error, please immediately notify the
sender by reply e-mail and destroy the original transmission and its
attachments without reading or saving it in any manner. If you
are not the intended recipient, or a person responsible for delivering it to
the intended recipient, you are hereby notified that any
disclosure, copying, distribution or use of any of the information contained
in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of
email transmission. Users and employees of the e-mail system are expressly
required not to make defamatory statements and not
to infringe or authorize any infringement of copyright or any other legal
right by email communications. Any such communication is
contrary to company policy. The company will not accept any liability in
respect of such communication.
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From DWUTKA at marlow.com Fri Aug 19 02:31:17 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Fri, 19 Aug 2005 02:31:17 -0500
Subject: [dba-VB] Smtp mail from vb.net
Message-ID: <123701F54509D9119A4F00D0B747349016DDC6@main2.marlow.com>
Why not just use SMTP directly. Remind me tomorrow, and I'll send you the
VB code I wrote to actually communicate (and send email) through SMTP
commands (using winsocks)
Drew (I'm going to bed, otherwise I'd dig it up now...)
> -----Original Message-----
> From: John W. Colby [SMTP:jwcolby at colbyconsulting.com]
> Sent: Thursday, August 18, 2005 10:09 PM
> To: ebarro at afsweb.com; dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
> I am attempting to create a system that will take data from a database,
> export it into a text file, then send that file as an attachment to an
> email
> to an insurance company. Later I will need to get an FTP channel going to
> send the file to an FTP site. I would prefer to avoid using Outlook, i.e.
> just have DotNet directly send the email.
>
> My home office is connected to the internet via the cable company. They
> do
> port 25 blocking, forcing me to send to their SMTP server (from here at my
> office). It was for that reason that I sent to mail.optonline.com, as
> that
> is the SMTP server address used by my Outlook (from my home office). I am
> actually in the process of switching to a new hosting company that will
> allow me to use an alternate port to transmit email. That will still
> require me to hit that company's SMTP server, but at least I can send from
> anywhere I may be working to the same SMTP address. As it currently
> stands,
> I have to constantly futz with the SMTP server address as I move my laptop
> from my home to my client to my sister-in-law etc. All three of those
> locations goes through a ISP that performs port 25 blocking.
>
> Anyway.....
>
> I am trying to set up email for my vb.net program. It would be nice if it
> just worked, from wherever I plopped it down. And, of course, I do not
> understand anything about email, SMTP servers, or even vb.net. I guess
> that
> would make me jack of all trades... ;-) Or at least master of none of
> these.
>
> Someday I hope to be able to say I at least understand the vb.net part.
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
> Sent: Thursday, August 18, 2005 10:55 PM
> To: dba-vb at databaseadvisors.com
> Subject: RE: [dba-VB] Smtp mail from vb.net
>
>
> If you are trying to send via mail.optonline.com and it resolves to one of
> your machines on the internal network it won't work. Try using localhost
> which resolves to 127.0.0.1 (assuming that the mail server is your local
> machine) or the internal IP of the smtp server.
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Thursday, August 18, 2005 6:58 PM
> To: VBA
> Subject: [dba-VB] Smtp mail from vb.net
>
> I'm trying to get .net to send email for me without going through Outlook.
> I
> found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box
> though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
>
>
> ----------------------------------------------------------------
> The information contained in this e-mail message and any file, document,
> previous e-mail message and/or attachment transmitted
> herewith is confidential and may be legally privileged. It is intended
> solely for the private use of the addressee and must not be
> disclosed to or used by anyone other than the addressee. If you receive
> this
> transmission by error, please immediately notify the
> sender by reply e-mail and destroy the original transmission and its
> attachments without reading or saving it in any manner. If you
> are not the intended recipient, or a person responsible for delivering it
> to
> the intended recipient, you are hereby notified that any
> disclosure, copying, distribution or use of any of the information
> contained
> in or attached to this transmission is STRICTLY
> PROHIBITED. E-mail transmission cannot be guaranteed to be secure or error
> free as information could be intercepted, corrupted,
> lost, destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message, which arise as a result of
> email transmission. Users and employees of the e-mail system are expressly
> required not to make defamatory statements and not
> to infringe or authorize any infringement of copyright or any other legal
> right by email communications. Any such communication is
> contrary to company policy. The company will not accept any liability in
> respect of such communication.
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
From sgsax at ksu.edu Fri Aug 19 10:13:55 2005
From: sgsax at ksu.edu (Seth Galitzer)
Date: Fri, 19 Aug 2005 10:13:55 -0500
Subject: [dba-VB] Smtp mail from vb.net
In-Reply-To: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
References: <013001c5a461$68846fe0$6c7aa8c0@ColbyM6805>
Message-ID: <4305F733.7030507@ksu.edu>
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through Outlook.
> I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing obvious
> happens, no exception thrown. No email is delivered to my mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws an
> error "system.web.httpexception - could not access cdo.message object".
>
> Any ideas? If not does anyopne have a drop in function for sending email
> that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University
From jwcolby at colbyconsulting.com Mon Aug 22 21:35:59 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 22:35:59 -0400
Subject: [dba-VB] Setting up SQL Server on a system
In-Reply-To: <4305F733.7030507@ksu.edu>
Message-ID: <000801c5a78b$68c94200$6c7aa8c0@ColbyM6805>
What is involved in setting up the lite version of SQL server that comes
with .net? Is it already there if the .net framework is there? If so, how
do you determine what the server is called when you install a project to
run?
I have a service that I created that has an installer "built in". I can
install the service relatively easily and it is running etc. Now I want
that service to start a VB.Net application that has a table in SQL server.
That is NOT critical (an mdb works just fine) but I want to learn how to use
the SQL Server instance that comes with .Net.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Seth Galitzer
Sent: Friday, August 19, 2005 11:14 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] Smtp mail from vb.net
I built a demo for Access that does this using a few VB sites.
This one has a fully-function VB app that uses the MS Winsock ActiveX
control to do the TCP/IP stuff:
http://www.vbip.com/winsock/winsock_uucode_02.asp
I modified it using the following socket class to replace the dependency
on the MS Winsock control:
http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp
I also put together a VB6 app that includes my modifications used in the
Access demo. I suspect it should port over to .net relatively easily.
You can get both from the downloads area on my website.
Seth
John W. Colby wrote:
> I'm trying to get .net to send email for me without going through
> Outlook. I found the following on the web:
>
> Imports System.Web.Mail
> Imports System.IO
> Module basMail
> 'TWO FUNCTIONS
> 'SAME EXCEPT FIRST TAKES A STRING FOR ATTACHMENT
> 'SECOND TAKES AN ARRAY LIST SO YOU CAN SEND MULTIPLE
> 'ATTACHMENTS
> 'FROM: Email address FRom
> 'TO: EMAIL address To
> 'Subject: Subject; Body: MessageText
> 'Optional CC, BCC: CC and bcc recipients
> 'SMTPSERVER: Optional, if not specified
> 'local machine is used
> 'AttachmentFile (first function: Optional, file name)
> 'AttachmentFiles (second function: Optional, list of
> 'attachments in form of an array list)
>
> Public Sub SendMailOneAttachment(ByVal From As String, _
> ByVal sendTo As String, ByVal Subject As String, _
> ByVal Body As String, _
> Optional ByVal AttachmentFile As String = "", _
> Optional ByVal CC As String = "", _
> Optional ByVal BCC As String = "", _
> Optional ByVal SMTPServer As String = "Mail.optonline.com")
>
> Dim myMessage As MailMessage
>
> Try
> myMessage = New MailMessage()
> With myMessage
> .To = sendTo
> .From = From
> .Subject = Subject
> .Body = Body
> .BodyFormat = MailFormat.Text
> 'CAN USER MAILFORMAT.HTML if you prefer
>
> If CC <> "" Then .Cc = CC
> If BCC <> "" Then .Bcc = ""
>
> If FileExists(AttachmentFile) Then _
> .Attachments.Add(AttachmentFile)
>
> End With
>
> If SMTPServer <> "" Then _
> SmtpMail.SmtpServer = SMTPServer
> SmtpMail.Send(myMessage)
>
> Catch myexp As Exception
> Throw myexp
> End Try
>
> End Sub
>
> When I call the function not passing in an smtp server, nothing
> obvious happens, no exception thrown. No email is delivered to my
> mail box though.
>
> If I pass in mySMTP server for outlook mail.optonline.com, it throws
> an error "system.web.httpexception - could not access cdo.message
> object".
>
> Any ideas? If not does anyopne have a drop in function for sending
> email that they can walk me through using??
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
--
Seth Galitzer sgsax at ksu.edu
Computing Specialist http://puma.agron.ksu.edu/~sgsax
Dept. of Plant Pathology
Kansas State University _______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Mon Aug 22 22:06:22 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Mon, 22 Aug 2005 23:06:22 -0400
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 08:06:14 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 08:06:14 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 08:58:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 09:58:40 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <123701F54509D9119A4F00D0B747349016DE03@main2.marlow.com>
Message-ID: <002801c5a7ea$c7485780$6c7aa8c0@ColbyM6805>
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 10:42:53 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 11:42:53 -0400
Subject: [dba-VB] VB.Net - Data reader class
Message-ID: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From DWUTKA at marlow.com Tue Aug 23 11:35:19 2005
From: DWUTKA at marlow.com (DWUTKA at marlow.com)
Date: Tue, 23 Aug 2005 11:35:19 -0500
Subject: [dba-VB] VB.Net - Hook an open program
Message-ID: <123701F54509D9119A4F00D0B747349016DE13@main2.marlow.com>
Why fire a timer over and over, to check things. Look up SetWaitableTimer.
It's one of a few API's where you can set a 'fire and forget' timer. The OS
will just alert you when the time is reached for something to run.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Tuesday, August 23, 2005 8:59 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Yes, that is the gist of it. I have a functioning service that ATM just
fires a timer every N seconds. I am developing another program that loads
the table of events needing to be run into classes. Originally this program
will have a form with a timer that causes the events to be examined to see
if it is time to run one of them. I load each event from the table into a
class simply so that I can not hit the disk every timer tick. So this
program watches the events in the loaded class instances. When it is time
to run, it will open a program and feed it command line parameters.
ATM the program being opened is an Access program that sends the reports out
to the client Insurance company. Access will open, send the reports, log
them sent, mark the records as sent and shut back down.
I was (am still) doing all of this in Access, but I want a service to run to
do the trigger part. I will in fact eventually port this whole thing into
VB.Net. This is a perfect application of .Net since the process is really
pulling data, building CSV and "fixed width" TXT files with specific names
in specific locations on the disk, then attaching them to emails and / or
FTPing the files out to the client Insurance company.
Access handles this OK but since the Access GUI isn't needed at all, having
it all in VB.Net really just makes sense - assuming that I can get the Email
and FTP parts happening. It turns out that .Net does not have that stuff
built in yet, you have to find and learn third party code, not to mention
things like how SMPT works etc. Outlook "just did it" for me for that part.
Anyway, I am working on the port for this stuff, working from the service
outwards. I really think I will keep an "interface" in the system, where
the scheduler is (eventually, once debugged) embedded right in the service,
and the reporting code is a standalone program just opened by the scheduler.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Tuesday, August 23, 2005 9:06 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
Let me see if I understand what you are talking about. You have a Service
that is really going to be the 'scheduler', because it is going to run the
tasks (from the database) when you need them. However, you want to create a
GUI to interact with that service (which you are probably running under
specific credentials, so it can't interact with the desktop.)
If that is the case, again, Winsocks.
Drew
-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Monday, August 22, 2005 10:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 13:41:51 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 14:41:51 -0400
Subject: [dba-VB] .net error codes
Message-ID: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From mikedorism at verizon.net Tue Aug 23 13:47:43 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:47:43 -0400
Subject: [dba-VB] .net error codes
In-Reply-To: <003801c5a812$5379dc20$6c7aa8c0@ColbyM6805>
Message-ID: <000201c5a813$266ba140$2e01a8c0@dorismanning>
I know what you mean. With VBA error codes, you could just trap the error
number and go from there. With .Net, you have to trap the type of
exception, and then the number/message of the exception.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 2:42 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] .net error codes
And I thought VBA error codes were ugly. ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From mikedorism at verizon.net Tue Aug 23 13:56:47 2005
From: mikedorism at verizon.net (Mike & Doris Manning)
Date: Tue, 23 Aug 2005 14:56:47 -0400
Subject: [dba-VB] VB.Net - Data reader class
In-Reply-To: <002b01c5a7f9$56313d50$6c7aa8c0@ColbyM6805>
Message-ID: <000301c5a814$6ad51950$2e01a8c0@dorismanning>
Hi John,
Your code looks really good. The only thing you are missing is checking the
status of the connection before opening or closing it.
As for your questions about the data reader...The connection and command
object have to be open in order for the data reader to work. I do not open
the connection or command until the data reader is needed so the flow you
have makes sense to me.
Doris Manning
mikedorism at verizon.net
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Tuesday, August 23, 2005 11:43 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Data reader class
As you might have guessed from my posts, I am a real nubee to vb.net. As
such I am trying to make my life easier in getting real work done. One
thing I need to do a lot is to open data readers. While the absolute
minimum code required to do this is not overly complex, by the time you
capture errors and stuff it turns into a fair size chunk of code. Having
done it once for a specific thing I was doing I pulled it out into a class
so that I could just instantiate the class every time I needed to do this.
Unfortunately I don't really understand the interactions between the pieces.
For example should I just store the provider and datasrc into the connection
string and wait. Then when a reader is requested, call back up the chain -
the function requesting a reader object requests a command object, which
requests a connection. Once the connection is valid the command object is
created, then the reader object is created and handed back. Once all this
is done, can the connection be closed? What about the command object? Can
the reader be used if the connection and command object no longer exist?
It seems like that is what I should be doing, especially in light of the
"disconnected" thing so in vogue. The code that follows does NOT do any of
that, rather creates a connection which it holds open, creates a command
object which it holds open, and finally creates a reader object on request.
Again, the objective of this whole exercise is to have a class that I just
call passing all the right stuff, which does the work, traps and logs
errors, and hands back a reader on request.
The class is as follows. Please comment on it and let me know if I am
missing something, making my life harder etc.
Imports System.Data
Imports System.Data.OleDb
Public Class clsData
Private mcnn As OleDbConnection
Private mcmd As OleDbCommand
Private mdr As OleDbDataReader
Private mstrSQL As String
Private mstrCnn As String
Private mstrDataSrc As String
Private mstrProvider As String
'
'Get the provider and data source strings
'Store them locally "just because" and to assist debugging
'
Public Sub New(ByVal lstrProvider As String, ByVal lstrDataSrc As
String)
mstrProvider = lstrProvider
mstrDataSrc = lstrDataSrc
mstrCnn = mstrProvider
mstrCnn.Concat(mstrDataSrc)
mGetToDataSrc()
End Sub
'
'Use the connection string to open a connection
'replace the messagebox with logfile
'
Private Function mGetToDataSrc()
mstrCnn = mstrCnn
mstrDataSrc = mstrDataSrc
mstrCnn += mstrDataSrc
mcnn = New OleDbConnection(mstrCnn)
Try
mcnn.Open()
MessageBox.Show("Connection opened successfully")
Catch e As Exception
MessageBox.Show("Connection failed to open successfully:" +
e.ToString())
Exit Function
End Try
End Function
'
'Pass in a SQL statement
'Using the sql statement and the connection, get a command object
'
Property pSQL() As String
Get
pSQL = mstrSQL
End Get
Set(ByVal lstrsql As String)
mstrSQL = lstrsql
Try
mcmd = New OleDbCommand(mstrSQL, mcnn)
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Set
End Property
'
'Using the command object, get a data reader
'
ReadOnly Property pDR() As OleDbDataReader
Get
Try
mdr = mcmd.ExecuteReader
pDR = mdr
Catch e As Exception
MessageBox.Show("Command failed to open successfully:" +
e.ToString())
Exit Property
End Try
End Get
End Property
Protected Overrides Sub Finalize()
MyBase.Finalize()
mdr.Close()
mcnn.Close()
MessageBox.Show("Connection closed successfully")
End Sub
End Class
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From artful at rogers.com Tue Aug 23 15:49:28 2005
From: artful at rogers.com (Arthur Fuller)
Date: Tue, 23 Aug 2005 16:49:28 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <000901c5a78f$a3ddef40$6c7aa8c0@ColbyM6805>
Message-ID: <200508232049.j7NKnUR31133@databaseadvisors.com>
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business.
To put it another way, everything you can blame on MS should be blamed on
MS. Set it up in the BE and DO NOT INTERFERE.
Not to say there are no reasons for services, but from what you have
described thus far, this is NOT one of them. Schedule the job at a frequency
you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going.
AF`s Rule 1: everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 15:56:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 16:56:03 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003c01c5a825$12c824d0$6c7aa8c0@ColbyM6805>
LOL, this is an MDB.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Tue Aug 23 16:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Tue, 23 Aug 2005 17:32:05 -0400
Subject: [dba-VB] VB.Net - Hook an open program
In-Reply-To: <200508232049.j7NKnUR31133@databaseadvisors.com>
Message-ID: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
OK< sorry, I just fired off that response.
This is a system that pulls data out of a set of related tables and massages
it into a text file. The end result is a fixed width report (at this
moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
DOZENS). This report will be sent to a client Insurance company where it
will be imported into a mainframe.
The "jobs" are reports that have to be sent. The same report may have to be
sent multiple places, attached to an email in one case, FTPed in another.
It is in fact also being sent to our own people (MY client, the call center)
in a CSV format. Related records from a DOZEN tables (or more) have to be
pulled, some have to be denormalized (placed in a temp table) then
everything linked back together. Once the data is in a "single record"
format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
format. Unfortunately the client keeps changing where the fields go in the
record, what the format looks like etc.
And yes, this is happening on a regular basis. The client (insurance
company) is moving their entire company to a new software package, they are
clueless as you might expect, and things move slowly. TWO years so far (and
counting). They have even flopped back and forth between Fixed width and
comma delimited (and back again). But... I design to allow me to just
change the table.
As a result, I have set it all up so that it is table driven. I have a
table of what they call their fields, what position in the "big string" each
field (start and stop bytes), the name of the field in MY application which
maps to the field in THEIR application, the format string that makes it look
like they want, whether the field MUST exist in order to even allow the
export to occur etc.
I read the format table out and in to a field def/supervisor class system.
Another class causes the data denormalization to occur, handles some details
like checking that offsets (dates) fall within specific windows, pulls the
data out of my query and hands it off to the field supervisor which hands
each data piece to the appropriate "field class" which formats the field per
the instructions in the format table and hands back the piece to the
supervisor which inserts it into the "big string" in the right place... OR
into a comma delimited "CSV" format string, and hands the finished formatted
"big string" off to the data logger which writes it out to a file on a disk
with a specific name and a specific location on the hard disk.
Once the entire file is written, the finished file is placed in a "job"
queue to be sent out to wherever it is going.
This process is an entire application, with (in Access) 11 classes and a
handful of modules. There is absolutely nothing trivial about doing this.
The upside is that as the client comes back and says "no, move this field to
here, left justify in the field instead of right, and oh, by the way it
should have 4 decimal digits after the decimal point instead of two", I can
just go into my definition table and make the appropriate changes, and the
new report pops out as they request. Furthermore the process is broken down
into "black boxes" that create the export data, logs the finished export
string, logs the fact that a given record was exported and what file on the
hard disk it was placed in, transmits the file to the correct place, logs
the fact that the specified file was transmitted. When I am finished I can
run a query to see if a claim record was sent, what file it is in and where
on the disk it resides, what day and time it was sent, what method and
address was used to send it etc. If a record fails at any step, an email is
sent to me and my "boss" at my client informing me that step X of the
process failed.
Doing that does NOT allow "setting it up in the BE and do not interfere".
This is NOT an FE in the classic sense, it is a report generator / logger /
sender application, which, just happens to be, in an FE (of its own). All
of this is working at this point but it is written in VBA / Access FE
container. I am looking at moving the entire thing to .Net, on my own dime,
as an exercise in learning VB.Net.
Now... For the piece about which I am asking, I am discussing the scheduler
part, what report is sent to whom, using what transmission method, at what
time of the day/night, including / excluding holidays / weekends / custom
schedule etc. The client wants it, and the client is willing to pay for it,
so the client gets it. I am just examining my options for moving JUST THIS
PIECE (since the whole thing is modular anyway) into VB.Net.
Does that make it a little clearer? ;-)
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Tuesday, August 23, 2005 4:49 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program
I think that you are going about this is in a seriously wrong way, JWC. IMO,
you create the jobs and schedule them and keep the FE _way_ out of the
picture. Unless I am misunderstanding you, you are putting the FE before the
BE -- which IMO is the biggest no-no in the SQL business. To put it another
way, everything you can blame on MS should be blamed on MS. Set it up in the
BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
from what you have described thus far, this is NOT one of them. Schedule the
job at a frequency you like, then leave your FEs do realize the results.
You muddy the waters too much by asking the FEs to muddy the waters. You are
the worm chasing its tail, IMO, in the direction you are going. AF`s Rule 1:
everything the BE can do, the BE should do.
Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
the FE.
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: August 22, 2005 11:06 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - Hook an open program
I want to load an application that loads scheduled tasks into classes from a
database. Once the tasks are loaded I want my service to call this
application and ask it to run any tasks that the scheduler deems ready to
run. Is it possible for one program to call another open (running) program?
I would like the scheduler to be part of the service but until the system is
debugged I want the scheduler to be a program with a user interface that I
can watch. For this reason, the service would cause the scheduler to load,
and then periodically "call" the scheduler and ask it to check its list of
tasks and run any as appropriate. Is this possible?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Wed Aug 24 02:07:03 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 03:07:03 -0400
Subject: [dba-VB] Don't ya just love it when...
Message-ID: <004a01c5a87a$70fc3320$6c7aa8c0@ColbyM6805>
I found what looks to be a really cool RSS Feed extractor to pull rss data
into a database.
VB.Net http://www.vbdotnetheaven.com/Code/Aug2003/2147.asp
and C#.net. http://www.c-sharpcorner.com//Code/2002/Aug/RssFeedProject.asp
Of course it doesn't work in VB.net for a variety of reasons. The script
for building the SQL database just isn't to be found anywhere. Luckily I
went and found the C# version, whereupon in the zip file I found the SQL
script and ran it.
Next, it places the tables in the Master database. Sigh.
Next, it needs an XML config file configured and placed in the same
directory as the resulting EXE. Again, not in the VB version, but right
there in the C# zip. However I don't know how to configure it. The
contents looks like:
Obviously the connection string will need to be a SQL Server connection
string (which I have seen but can't just write) and the database (I assume)
needs to be "Master" (since that's where the tables were thrown by the
script)?
Can anyone work with me to see if this thing will actually work if I get
this last piece happening. I really want to pull the RSS feed for my
NetFlix orders and Queue into the database for posterity, particularly my
recent orders RSS.
RSS is cool, but if I can grab the data it will be even more cool.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 10:14:58 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:14:58 -0400
Subject: [dba-VB] RSS Feed database
Message-ID: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Do I have no takers helping me get this thing working? The end result will
be a system for logging an RSS feed into data tables for analysis or use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
----------------------------------------------------------------------------
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
----------------------------------------------------------------------------
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From marcus at tsstech.com Wed Aug 24 10:24:49 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:24:49 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
Where is the Return statement?
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 10:31:25 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 11:31:25 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
I'm just shooting int the dark... How about parenths around the @ID int
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:15 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] RSS Feed database
Do I have no takers helping me get this thing working? The end result
will
be a system for logging an RSS feed into data tables for analysis or
use.
Could be niiiice. ;-)
I have made good progress, I have a database set up in SQL Server
specifically for this project. I have the tables built per the script
included in the C# zip. There are two records in the WebNewsSource
table.
I am logging in to the database. The issue at this point is that the SP
that is supposed to return the rows in the database apparently doesn't.
The SP looks like:
------------------------------------------------------------------------
----
-----
-- Stored procedure that will select an existing row from the table
'WebNewsSource'
-- based on the Primary Key.
-- Gets: @ID int
------------------------------------------------------------------------
----
-----
CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
@ID int
AS
SET NOCOUNT ON
-- SELECT an existing row from the table.
SELECT
[ID],
[Source],
[RSSURL],
[RSSSelect],
[RSSTitle],
[RSSLink],
[RSSDescription]
FROM [dbo].[WebNewsSource]
WHERE
[ID] = @ID
GO
How do I go about just running the SP passing in an ID and viewing the
results?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From fhtapia at gmail.com Wed Aug 24 10:41:02 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Wed, 24 Aug 2005 08:41:02 -0700
Subject: [dba-VB] RSS Feed database
In-Reply-To:
References:
Message-ID:
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will
> be a system for logging an RSS feed into data tables for analysis or
> use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table.
> I am logging in to the database. The issue at this point is that the SP
> that is supposed to return the rows in the database apparently doesn't.
>
> The SP looks like:
>
> ------------------------------------------------------------------------
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From jwcolby at colbyconsulting.com Wed Aug 24 10:52:36 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 11:52:36 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To:
Message-ID: <011c01c5a8c3$dbf235a0$6c7aa8c0@ColbyM6805>
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Connec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value = id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there, it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for some
reason the SP is not returning data. That is the first error encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
> ------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From marcus at tsstech.com Wed Aug 24 11:03:44 2005
From: marcus at tsstech.com (Scott Marcus)
Date: Wed, 24 Aug 2005 12:03:44 -0400
Subject: [dba-VB] RSS Feed database
Message-ID:
John,
Try opening the connection earlier in the code.
Scott Marcus
IT Programmer
TSS Technologies Inc.
www.tss.com
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 11:53 AM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] RSS Feed database
I get a record back. Now... The code in the VB.Net program looks like:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Namespace RSS_Feed
'
' This class holds all of the data data defines an RSS Feed Source.
' The RSS Feed Source data comes from the WebNewsSource table
'
Public Class RSSItem
Private id As Integer
Public Sub New(ID As Integer)
' Set the id
id = ID
' Fill the data
FillMe()
End Sub 'New
Private Sub FillMe()
Dim strSQLCnn As String
Try
'strSQLCnn =
System.Configuration.ConfigurationSettings.AppSettings("ConnectString")
strSQLCnn = "server=colbyM6805;uid=sa;
password=;database=master"
' Set up the connection
'Dim objConnection As New
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("Co
nnec
tString"))
Dim objConnection As New SqlConnection(strSQLCnn)
' Create a data table
Dim dt As New DataTable("RSS")
' Set up the command
Dim objCommand As New
SqlCommand("upWebNewsSource_SelectOne", objConnection)
objCommand.CommandType = CommandType.StoredProcedure
' Set up SP parameters
objCommand.Parameters.Add("@ID", SqlDbType.Int).Value =
id
' Open the connection and fill that datatable
objConnection.Open()
Dim da As New SqlDataAdapter(objCommand)
da.Fill(dt)
' close the connection
objConnection.Close()
' We will use the first row ( We will only have one row)
Dim dr As DataRow = dt.Rows(0)
'Dim dr As DataRow = dt.Rows(1)
' Set the class's Properties
[Select] = dr("RSSSelect").ToString()
Title = dr("RSSTitle").ToString()
Link = dr("RSSLink").ToString()
Description = dr("RSSDescription").ToString()
URL = dr("RSSURL").ToString()
Catch ex As Exception
MessageBox.Show("ERROR:" + ex.Message.ToString())
Console.WriteLine(("ERROR:" + ex.Message.ToString()))
End Try
End Sub 'FillMe
End Class 'RSSItem
End Namespace 'RSS_Feed '
You can see where I had to hard code the connection string because I
couldn't get the configuration setting file to load. No problem there,
it
at least works. I had a bit of an issue getting logged in until I set
"Windows and SQL Server Login". Now that issue went away. However I
get an
error on:
Dim dr As DataRow = dt.Rows(0)
The error is that there is no record at position 0 indicating that for
some
reason the SP is not returning data. That is the first error
encountered
however so I'm a bit baffled.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Francisco
Tapia
Sent: Wednesday, August 24, 2005 11:41 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
If you go to your QA window and type in
EXEC upWebNewsSource_SelectOne 1
or a valid ID, what is the resultset?
On 8/24/05, Scott Marcus wrote:
>
> I'm just shooting int the dark... How about parenths around the @ID
> int
>
> Scott Marcus
> IT Programmer
> TSS Technologies Inc.
> www.tss.com
>
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W.
> Colby
> Sent: Wednesday, August 24, 2005 11:15 AM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] RSS Feed database
>
> Do I have no takers helping me get this thing working? The end result
> will be a system for logging an RSS feed into data tables for analysis
> or use.
> Could be niiiice. ;-)
>
> I have made good progress, I have a database set up in SQL Server
> specifically for this project. I have the tables built per the script
> included in the C# zip. There are two records in the WebNewsSource
> table. I am logging in to the database. The issue at this point is
> that the SP that is supposed to return the rows in the database
> apparently doesn't.
>
> The SP looks like:
>
> ----------------------------------------------------------------------
> --
> ----
> -----
> -- Stored procedure that will select an existing row from the table
> 'WebNewsSource'
> -- based on the Primary Key.
> -- Gets: @ID int
>
------------------------------------------------------------------------
> ----
> -----
> CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
> AS
> SET NOCOUNT ON
> -- SELECT an existing row from the table.
> SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
> FROM [dbo].[WebNewsSource]
> WHERE
> [ID] = @ID
>
>
> GO
>
> How do I go about just running the SP passing in an ID and viewing the
> results?
>
> John W. Colby
> www.ColbyConsulting.com
>
> Contribute your unused CPU cycles to a good cause:
> http://folding.stanford.edu/
>
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 11:47:20 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 09:47:20 -0700
Subject: [dba-VB] RSS Feed database
References: <010301c5a8be$9a7f1700$6c7aa8c0@ColbyM6805>
Message-ID: <430CA498.4080302@shaw.ca>
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept.
I just didn't feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html"
'objExplorer.Navigate "http://www.Viescas.com/"
'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/"
Do While (objExplorer.Busy)
Loop
Dim webtx As String
Dim strHTML As String
Set objDocument = objExplorer.Document
objDocument.Open
objDocument.Writeln "My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
"
objDocument.Writeln "
"
objDocument.Writeln strpassHTML
objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result will
>be a system for logging an RSS feed into data tables for analysis or use.
>Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource table.
>I am logging in to the database. The issue at this point is that the SP
>that is supposed to return the rows in the database apparently doesn't.
>
>The SP looks like:
>
>----------------------------------------------------------------------------
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>----------------------------------------------------------------------------
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 12:22:47 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 13:22:47 -0400
Subject: [dba-VB] RSS Feed database
In-Reply-To: <430CA498.4080302@shaw.ca>
Message-ID: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Marty,
My purpose isn't to see a web page but rather to actually parse the xml file
and grab the data into a table. Specifically I just got an account with
NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
more importantly to show what you have rented. I want to capture a database
of what I have rented so that I don't rent it again (or know that I am doing
so), but also to get a table with the url back to the movie description.
Thus I really do want to open the feed, read it in, and grab the specific
fields and write them into a table.
In fact I have managed to get around the SQL Server issue by using the class
I posted yesterday for opening a reader (in Access). Access it trivial to
get to and get the data into and out of so I just rewrote the first part to
use my little class.
As my momma used to say...
"There's more ways to kill a cat than choking him to death on butter"
Luckily the part that opens the RSS feed just works. I am now working on
replacing the write of the data back out to SQL server with code to use my
class - modified a bit.
I wish I knew more about SQL Server but I have to do what works and Access
works ATM.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
Sent: Wednesday, August 24, 2005 12:47 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] RSS Feed database
I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
feeds and placed in tables, just did it as a proof of concept. I just didn't
feel like running it daily to keep it uptodate. never
found a way tokeep it uptodate or if Ms had an archive.
I did this a year ago maybe there is something now.
Never fully fleshed it out. If you want a copy, I'll have to check it
still works.
I have also done things like this that can be done better now through
RSS Viewers.
' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
displays in IE window
'But it doesn't require much code.
If you do use this,snaffle the xsl file off my website and use locally
it will be quicker.
Save the XSL in notepad with UTF-8 format.
Sub BBCRSSFeed()
Dim srcTree As Object
Dim xsltTree As Object
Dim strHTML As String
Set srcTree = CreateObject("Msxml.DOMDocument")
srcTree.async = False
srcTree.Load
("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
xsltTree.async = False
'this xsl transform file can also be loaded via a local disk file
xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
strHTML = srcTree.transformNode(xsltTree)
Debug.Print strHTML
' Display transformed xml rss news feed in html via IE 6.0 window
testIE (strHTML)
End Sub
Sub testIE(strpassHTML As String)
'------------------
Dim objExplorer As Object
Dim objDocument As Object
Dim strComputer As String
Dim strReturn As String
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Navigate "about:blank"
objExplorer.Toolbar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 800
objExplorer.Height = 570
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
'dont't need to navigate to file or http site like below
'just drop html string created from xslt into the IE document object
'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
"My BBC Technology RSS
Feed"
'A little bit of CSS code to make it funky
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln ""
objDocument.Writeln "BBC Feed | "
objDocument.Writeln "
" objDocument.Writeln "
"
objDocument.Writeln strpassHTML objDocument.Writeln ""
'objDocument.Write()
objDocument.Close
'MsgBox "finished"
Set objExplorer = Nothing
Set objDocument = Nothing
End Sub
John W. Colby wrote:
>Do I have no takers helping me get this thing working? The end result
>will be a system for logging an RSS feed into data tables for analysis
>or use. Could be niiiice. ;-)
>
>I have made good progress, I have a database set up in SQL Server
>specifically for this project. I have the tables built per the script
>included in the C# zip. There are two records in the WebNewsSource
>table. I am logging in to the database. The issue at this point is
>that the SP that is supposed to return the rows in the database
>apparently doesn't.
>
>The SP looks like:
>
>-----------------------------------------------------------------------
>-----
>-----
>-- Stored procedure that will select an existing row from the table
>'WebNewsSource'
>-- based on the Primary Key.
>-- Gets: @ID int
>---------------------------------------------------------------------------
-
>-----
>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
> @ID int
>AS
>SET NOCOUNT ON
>-- SELECT an existing row from the table.
>SELECT
> [ID],
> [Source],
> [RSSURL],
> [RSSSelect],
> [RSSTitle],
> [RSSLink],
> [RSSDescription]
>FROM [dbo].[WebNewsSource]
>WHERE
> [ID] = @ID
>
>
>GO
>
>How do I go about just running the SP passing in an ID and viewing the
>results?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From martyconnelly at shaw.ca Wed Aug 24 14:34:26 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Wed, 24 Aug 2005 12:34:26 -0700
Subject: [dba-VB] RSS Feed database
References: <012801c5a8d0$72b7a8b0$6c7aa8c0@ColbyM6805>
Message-ID: <430CCBC2.4080300@shaw.ca>
Well you can do with a short subroutine to put rss xml in table , a lot
of debug statement
just to keep track of what I was doing. Uses XPath statement to grab
appropriate nodes from DOM.
'LoadXML "http://msdn.microsoft.com/rss.xml","Just Published"
'LoadXML "http://msdn.microsoft.com/webservices/rss.xml","Web Services"
'LoadXML "http://msdn.microsoft.com/vstudio/rss.xml","Visual Studio"
'LoadXML "http://msdn.microsoft.com/netframework/rss.xml","Net Framework"
'LoadXML "http://msdn.microsoft.com/vcsharp/rss.xml","VC Sharp"
'LoadXML "http://msdn.microsoft.com/visualc/rss.xml", "VisualC"
'LoadXML "http://msdn.microsoft.com/security/rss.xml", "Security"
'Loadxml "http://www.kbalertz.com/rss/acc.xml","accesskbalert"
Public Sub LoadXML(ByRef AdviserXML As String, strFeed As String)
'second parameter just provides a feed name field in general table
' On Error GoTo ErrorHandler
Const ACTION_NAME As String = "LoadXML"
Dim oDOMDocument As MSXML2.DOMDocument40
Dim oNodeList As IXMLDOMNodeList
Dim oAdviserDetailsNode As IXMLDOMNode
Dim oLowestLevelNode As IXMLDOMElement
Dim objXMLDOMNamedNodeMap As IXMLDOMNamedNodeMap
Dim sTempValue As String
Dim msFPTAdviserID As Object
'temporary database
Dim MyDb As Database
Dim MyRs As Recordset
Dim irec As Long
Dim strTitleLink As String
Set oDOMDocument = New MSXML2.DOMDocument40
oDOMDocument.async = False
oDOMDocument.validateOnParse = False 'very trusting
oDOMDocument.resolveExternals = False
oDOMDocument.preserveWhiteSpace = True
If Not oDOMDocument.Load(AdviserXML) Then
MsgBox Err.number & Err.Description
'Call Err.Raise(ERR_UNABLE_TO_LOAD_ADVISER_XML, ,
ERRDESC_UNABLE_TO_LOAD_ADVISER_XML)
Exit Sub
End If
Debug.Print "grabbed box"
Set oAdviserDetailsNode = oDOMDocument.documentElement
Set objXMLDOMNamedNodeMap = oAdviserDetailsNode.Attributes
'msFPTAdviserID = objXMLDOMNamedNodeMap.getNamedItem("title").nodeValue
Debug.Print "Set"
Debug.Print "msFPT"
Set oNodeList = oAdviserDetailsNode.selectNodes("//item/*")
Set MyDb = CurrentDb
Set MyRs = MyDb.OpenRecordset("RSSFeed")
irec = 0
MyRs.AddNew
For Each oLowestLevelNode In oNodeList
sTempValue = oLowestLevelNode.Text
' Debug.Print oLowestLevelNode.nodeName & "-" & vbCrLf &
oLowestLevelNode.Text
Select Case oLowestLevelNode.nodeName
Case "title"
Debug.Print sTempValue
MyRs!Title = sTempValue
strTitleLink = sTempValue
Case "PubDate"
Debug.Print sTempValue
MyRs!PubDate = sTempValue
Case "description"
Debug.Print sTempValue
MyRs!fdescription = sTempValue
Case "link"
Debug.Print sTempValue
'MyRs!link = sTempValue
'need # format for clickable link
MyRs!link = sTempValue & "#" & sTempValue & "#"
End Select
irec = irec + 1
If irec = 4 Then
'check if duplicate also check if " in string
Debug.Print DLookup("ID", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))
If IsNull(DLookup("Title", "RSSFeed", "Title=" & Chr(34) &
strTitleLink & Chr(34))) Then
MyRs!feed = strFeed
MyRs.Update
End If
MyRs.AddNew
irec = 0
End If
Next
Set MyRs = Nothing
Set MyDb = Nothing
Set oDOMDocument = Nothing
Set oAdviserDetailsNode = Nothing
Set objXMLDOMNamedNodeMap = Nothing
Exit Sub
ErrorHandler:
' Call NewError.Raise(Err.Number, Err.Source, Err.Description,
'MODULE_NAME, ACTION_NAME, Erl)
End Sub
John W. Colby wrote:
>Marty,
>
>My purpose isn't to see a web page but rather to actually parse the xml file
>and grab the data into a table. Specifically I just got an account with
>NetFlix. NetFilx has an RSS feed to show you what is in your queue, but
>more importantly to show what you have rented. I want to capture a database
>of what I have rented so that I don't rent it again (or know that I am doing
>so), but also to get a table with the url back to the movie description.
>
>Thus I really do want to open the feed, read it in, and grab the specific
>fields and write them into a table.
>
>In fact I have managed to get around the SQL Server issue by using the class
>I posted yesterday for opening a reader (in Access). Access it trivial to
>get to and get the data into and out of so I just rewrote the first part to
>use my little class.
>
>As my momma used to say...
>
>"There's more ways to kill a cat than choking him to death on butter"
>
>Luckily the part that opens the RSS feed just works. I am now working on
>replacing the write of the data back out to SQL server with code to use my
>class - modified a bit.
>
>I wish I knew more about SQL Server but I have to do what works and Access
>works ATM.
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of MartyConnelly
>Sent: Wednesday, August 24, 2005 12:47 PM
>To: dba-vb at databaseadvisors.com
>Subject: Re: [dba-VB] RSS Feed database
>
>
>I have a rough mdb that reads various MS programming (VB.Net C# Net) RSS
>feeds and placed in tables, just did it as a proof of concept. I just didn't
>feel like running it daily to keep it uptodate. never
>found a way tokeep it uptodate or if Ms had an archive.
>I did this a year ago maybe there is something now.
>
>Never fully fleshed it out. If you want a copy, I'll have to check it
>still works.
>
>I have also done things like this that can be done better now through
>RSS Viewers.
>' grabs BBC Tech News feed transforms RSS xml via XSLT in XSL file and
>displays in IE window
>'But it doesn't require much code.
>If you do use this,snaffle the xsl file off my website and use locally
>it will be quicker.
>Save the XSL in notepad with UTF-8 format.
>
>Sub BBCRSSFeed()
>Dim srcTree As Object
>Dim xsltTree As Object
>Dim strHTML As String
> Set srcTree = CreateObject("Msxml.DOMDocument")
> srcTree.async = False
> srcTree.Load
>("http://news.bbc.co.uk/rss/newsonline_uk_edition/technology/rss091.xml")
> 'srcTree.Load ("http://services.devx.com/outgoing/recentTipsFeed.xml")
> Set xsltTree = CreateObject("Msxml.DOMDOCUMENT")
> xsltTree.async = False
> 'this xsl transform file can also be loaded via a local disk file
> xsltTree.Load ("http://www5.brinkster.com/mconnelly/newsfeed.xsl")
>
> strHTML = srcTree.transformNode(xsltTree)
>
> Debug.Print strHTML
> ' Display transformed xml rss news feed in html via IE 6.0 window
> testIE (strHTML)
>
>End Sub
>Sub testIE(strpassHTML As String)
>'------------------
>
>Dim objExplorer As Object
>Dim objDocument As Object
>Dim strComputer As String
>
>Dim strReturn As String
>
>Set objExplorer = CreateObject("InternetExplorer.Application")
>
>objExplorer.Navigate "about:blank"
>objExplorer.Toolbar = 0
>objExplorer.StatusBar = 0
>objExplorer.Width = 800
>objExplorer.Height = 570
>objExplorer.Left = 0
>objExplorer.Top = 0
>objExplorer.Visible = 1
>'dont't need to navigate to file or http site like below
>'just drop html string created from xslt into the IE document object
>'objExplorer.Navigate "file://c:\temp\test.html" 'objExplorer.Navigate
>"http://www.Viescas.com/" 'objExplorer.Navigate "192.168.0.1/st_devic.html"
>'objExplorer.Navigate "http://checkip.dyndns.org/" Do While
>(objExplorer.Busy) Loop Dim webtx As String Dim strHTML As String Set
>objDocument = objExplorer.Document objDocument.Open objDocument.Writeln
>"My BBC Technology RSS
>Feed"
>'A little bit of CSS code to make it funky
>objDocument.Writeln " " { background-attachment: fixed; background-position: 97% bottom;
>" & _
> " background-image= 'url(logoBackGround.gif)';background-repeat:
>no-repeat;" & _
> " padding: 5px;font-family='Georgia';font-size: 80%;} >"
>
>objDocument.Writeln ""
>objDocument.Writeln ""
>objDocument.Writeln "BBC Feed | "
>objDocument.Writeln "
" objDocument.Writeln "
"
>objDocument.Writeln strpassHTML objDocument.Writeln ""
>'objDocument.Write()
>objDocument.Close
>'MsgBox "finished"
>Set objExplorer = Nothing
>Set objDocument = Nothing
>
>End Sub
>
>
>
>
>John W. Colby wrote:
>
>
>
>>Do I have no takers helping me get this thing working? The end result
>>will be a system for logging an RSS feed into data tables for analysis
>>or use. Could be niiiice. ;-)
>>
>>I have made good progress, I have a database set up in SQL Server
>>specifically for this project. I have the tables built per the script
>>included in the C# zip. There are two records in the WebNewsSource
>>table. I am logging in to the database. The issue at this point is
>>that the SP that is supposed to return the rows in the database
>>apparently doesn't.
>>
>>The SP looks like:
>>
>>-----------------------------------------------------------------------
>>-----
>>-----
>>-- Stored procedure that will select an existing row from the table
>>'WebNewsSource'
>>-- based on the Primary Key.
>>-- Gets: @ID int
>>---------------------------------------------------------------------------
>>
>>
>-
>
>
>>-----
>>CREATE PROCEDURE [dbo].[upWebNewsSource_SelectOne]
>> @ID int
>>AS
>>SET NOCOUNT ON
>>-- SELECT an existing row from the table.
>>SELECT
>> [ID],
>> [Source],
>> [RSSURL],
>> [RSSSelect],
>> [RSSTitle],
>> [RSSLink],
>> [RSSDescription]
>>
>>
>>FROM [dbo].[WebNewsSource]
>
>
>>WHERE
>> [ID] = @ID
>>
>>
>>GO
>>
>>How do I go about just running the SP passing in an ID and viewing the
>>results?
>>
>>John W. Colby
>>www.ColbyConsulting.com
>>
>>Contribute your unused CPU cycles to a good cause:
>>http://folding.stanford.edu/
>>
>>
>>_______________________________________________
>>dba-VB mailing list
>>dba-VB at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/dba-vb
>>http://www.databaseadvisors.com
>>
>>
>>
>>
>>
>>
>>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada
From jwcolby at colbyconsulting.com Wed Aug 24 15:32:05 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 16:32:05 -0400
Subject: [dba-VB] VB.Net - Executing queries - Microsoft Access connection
Message-ID: <013e01c5a8ea$e41d3460$6c7aa8c0@ColbyM6805>
What object do I use to execute a query against an connection / table. I
have gotten down to the table level but it looks like that is used for
getting a table to bind to a structure. All I really need to do is execute
a SQL statement that I construct on-the-fly that appends a record in a
table.
Microsoft Access connection
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Wed Aug 24 18:10:39 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Wed, 24 Aug 2005 19:10:39 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Message-ID: <014e01c5a901$0af384c0$6c7aa8c0@ColbyM6805>
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From word_diva at hotmail.com Thu Aug 25 11:43:53 2005
From: word_diva at hotmail.com (Nancy Lytle)
Date: Thu, 25 Aug 2005 12:43:53 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report generation
application
In-Reply-To: <003d01c5a82a$1e9a5210$6c7aa8c0@ColbyM6805>
Message-ID:
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they are
>clueless as you might expect, and things move slowly. TWO years so far
>(and
>counting). They have even flopped back and forth between Fixed width and
>comma delimited (and back again). But... I design to allow me to just
>change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each
>field (start and stop bytes), the name of the field in MY application which
>maps to the field in THEIR application, the format string that makes it
>look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class system.
>Another class causes the data denormalization to occur, handles some
>details
>like checking that offsets (dates) fall within specific windows, pulls the
>data out of my query and hands it off to the field supervisor which hands
>each data piece to the appropriate "field class" which formats the field
>per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and a
>handful of modules. There is absolutely nothing trivial about doing this.
>The upside is that as the client comes back and says "no, move this field
>to
>here, left justify in the field instead of right, and oh, by the way it
>should have 4 decimal digits after the decimal point instead of two", I can
>just go into my definition table and make the appropriate changes, and the
>new report pops out as they request. Furthermore the process is broken
>down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not interfere".
>This is NOT an FE in the classic sense, it is a report generator / logger /
>sender application, which, just happens to be, in an FE (of its own). All
>of this is working at this point but it is written in VBA / Access FE
>container. I am looking at moving the entire thing to .Net, on my own
>dime,
>as an exercise in learning VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the scheduler
>part, what report is sent to whom, using what transmission method, at what
>time of the day/night, including / excluding holidays / weekends / custom
>schedule etc. The client wants it, and the client is willing to pay for
>it,
>so the client gets it. I am just examining my options for moving JUST THIS
>PIECE (since the whole thing is modular anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
From jwcolby at colbyconsulting.com Thu Aug 25 12:38:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Thu, 25 Aug 2005 13:38:02 -0400
Subject: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
In-Reply-To:
Message-ID: <01c801c5a99b$be5a2150$6c7aa8c0@ColbyM6805>
Nancy,
The system I use started with a spreadsheet of field definitions I was given
by the insurance company (AGI) who is my client's client. So they sent me
something in spreadsheet format that looked like:
AIGFldName StartPos EndPos FldLen Format And I added on from
there
SomeCurrFld 1 10 10 Cur
SomeTxtFld 11 16 6 text
SomeDteFld 17 24 8 Date
Etc
I took this information and pulled it into an Access table. I then added
MyFldName MyFormatStr Critical IsUsed
Etc
So I now have a single table where I have what their field is called, where
it is in the fixed width string, my matching field name, the format string I
need to use to get it into the format they want, whether it is critical
(don't send without it), whether I actually have any data (field) to go in
that field etc.
What I then did was to build a clsFld that took each FIELD DEFINITION (one
record from this table) and loaded all the data for that record into
variables in the class header. Each clsFld instance is then saved in a
collection in the supervisor of this class (clsRecord), with the KEY being
the field name in MY database. I designed my system such that there is a
clsExport class, a clsRecord, and a clsFld. The record class is
instantiated once, loads the clsFld class instances and stores them into a
collection in the record class.
A method of clsRecord is then called by clsExport (supervisor) class, passed
a single record each time it is called. The clsRecord processes each field
in the record it is passed - iterates the field collection using dao (could
be done id ADO though). Basically clsRecord iterates through the fields in
the record passed in, calls a method in the matching clsFld, passing the
data to clsFld. ClsFld formats the data with the format string (remember
everything is a string in the end), justifies it in the string of the
required length (remember the length field?) and hands back the string to
clsRecord. ClsRecord then inserts the formatted data into the "bigString"
beginning at StartPos. When clsRec has iterated all the clsFld instances in
the collection of clsFld, it is done with the record and has a "big string"
with data in specific places in "big string". clsRecord then hands that
string back to clsExport which is responsible for storing the "big string"
in a file out on disk. In fact clsExport sets up a clsLog when it opens,
with the path to the file to be created as well as the name - with date etc
in the name. clsLog is just called passing it "big String" and it logs the
string out on the disk file.
So... To summarize, clsExport instantiates clsRecord (one instance) which
loads as many instances of clsFld as are required to handle exactly and only
the fields in the FieldDef table that are marked "Active". Each clsFld
instance "knows how" to format data for one field. It knows the data type
coming in, the format string to get it in the desired format, the length of
the string that the formatted data is going in, whether it is left or right
justified etc.
ClsExport loads the recordset of data to be exported, calls clsRecord.Format
once for each record to export. clsRecord calls each clsFld.Format to get
each field's data formatted correctly, loads the formatted data into "big
string" and hands "big string" back to clsExport. clsExport hands BigString
off to clsLog which gets it into the file out on the disk.
One of the bigger issues I ran into was the "denormalized" data I had to
include. There are (for example) 1 to N "deductions" to be made from a
claim payment, and I had to get all such deductions out of a normalized
form, into a denormalized form, and then that denormalized data joined to my
main data record, and processed into the "Deduction1, Deduction2,
Deduction3..." fields in "big string". Thus I have an entire process that
looks at the deductions, the date windows that the deductions are valid
compared to the date window that the payments are for, and then flattens
them into a table. Obviously the client defined N fields for this data (20
it turns out) so I had to handle a maximum of 20 deductions and get them
flattened into a single deduction record to join back to the main claim
record being processed.
Obviously there is more, but that is the big picture and should be enough
for you to start thinking about how to do things using compartmentalized
code (classes). The format table is a nicety that allows me to make
modifications to the system quickly and easily as the client changes their
requirements.
In fact I am in the process of porting my system to VB.Net. This stuff is
just VB. It makes absolutely no use of Access' RAD or GUI stuff so there is
no reason it couldn't be done directly in VB or VB.Net. In fact Access is
less than robust in terms of its reliability as I have discovered with this
system. If I were you though I would think about doing yours in VB.Net
rather than VB6.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Nancy Lytle
Sent: Thursday, August 25, 2005 12:44 PM
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB.Net - Hook an open program NOW: Report
generationapplication
I have just started a on an application and database that takes in claims
from doctors offices (this is in the USA) and then processes them and sends
them to the providers.
We get the data in many forms but it all has to go out in one format, which
means we do a lot of padding of fields, and other formatting to make sure
each field is in the right place and formatted correctly.
Although I am working with SQL Server/VB, the table based solution you came
up with sounds very intriguing, with easy updatability for any formatting
changes. I'd like to see if I could replicate something like that in my
SQL/VB environment.
If you would care to share any more hints or pieces of how you accomplished
this, I'd be very interested, as I am sure others would be.
I must say you constantly amazed me with the techniques that you come up
with to handle situations.
Nancy Lytle
N_Lytle at terpalum.umd.edu
>From: "John W. Colby"
>Reply-To: dba-vb at databaseadvisors.com
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>Date: Tue, 23 Aug 2005 17:32:05 -0400
>
>OK< sorry, I just fired off that response.
>
>This is a system that pulls data out of a set of related tables and
>massages
>it into a text file. The end result is a fixed width report (at this
>moment) in a SERIOUSLY denormalized format (ThisFld1, ThisFld2 etc by the
>DOZENS). This report will be sent to a client Insurance company where it
>will be imported into a mainframe.
>
>The "jobs" are reports that have to be sent. The same report may have
>to
>be
>sent multiple places, attached to an email in one case, FTPed in another.
>It is in fact also being sent to our own people (MY client, the call
>center)
>in a CSV format. Related records from a DOZEN tables (or more) have to be
>pulled, some have to be denormalized (placed in a temp table) then
>everything linked back together. Once the data is in a "single record"
>format (SERIOUSLY DENORMALIZED) it has to be exported out to a fixed width
>format. Unfortunately the client keeps changing where the fields go in the
>record, what the format looks like etc.
>
>And yes, this is happening on a regular basis. The client (insurance
>company) is moving their entire company to a new software package, they
>are clueless as you might expect, and things move slowly. TWO years so
>far (and counting). They have even flopped back and forth between
>Fixed width and comma delimited (and back again). But... I design to
>allow me to just change the table.
>
>As a result, I have set it all up so that it is table driven. I have a
>table of what they call their fields, what position in the "big string"
>each field (start and stop bytes), the name of the field in MY
>application which maps to the field in THEIR application, the format
>string that makes it look
>like they want, whether the field MUST exist in order to even allow the
>export to occur etc.
>
>I read the format table out and in to a field def/supervisor class
>system. Another class causes the data denormalization to occur, handles
>some details like checking that offsets (dates) fall within specific
>windows, pulls the data out of my query and hands it off to the field
>supervisor which hands each data piece to the appropriate "field class"
>which formats the field per
>the instructions in the format table and hands back the piece to the
>supervisor which inserts it into the "big string" in the right place... OR
>into a comma delimited "CSV" format string, and hands the finished
>formatted
>"big string" off to the data logger which writes it out to a file on a disk
>with a specific name and a specific location on the hard disk.
>
>Once the entire file is written, the finished file is placed in a "job"
>queue to be sent out to wherever it is going.
>
>This process is an entire application, with (in Access) 11 classes and
>a handful of modules. There is absolutely nothing trivial about doing
>this. The upside is that as the client comes back and says "no, move
>this field to here, left justify in the field instead of right, and oh,
>by the way it should have 4 decimal digits after the decimal point
>instead of two", I can just go into my definition table and make the
>appropriate changes, and the new report pops out as they request.
>Furthermore the process is broken down
>into "black boxes" that create the export data, logs the finished export
>string, logs the fact that a given record was exported and what file on the
>hard disk it was placed in, transmits the file to the correct place, logs
>the fact that the specified file was transmitted. When I am finished I can
>run a query to see if a claim record was sent, what file it is in and where
>on the disk it resides, what day and time it was sent, what method and
>address was used to send it etc. If a record fails at any step, an email
>is
>sent to me and my "boss" at my client informing me that step X of the
>process failed.
>
>Doing that does NOT allow "setting it up in the BE and do not
>interfere". This is NOT an FE in the classic sense, it is a report
>generator / logger / sender application, which, just happens to be, in
>an FE (of its own). All of this is working at this point but it is
>written in VBA / Access FE container. I am looking at moving the
>entire thing to .Net, on my own dime, as an exercise in learning
>VB.Net.
>
>Now... For the piece about which I am asking, I am discussing the
>scheduler part, what report is sent to whom, using what transmission
>method, at what time of the day/night, including / excluding holidays /
>weekends / custom schedule etc. The client wants it, and the client is
>willing to pay for it, so the client gets it. I am just examining my
>options for moving JUST THIS PIECE (since the whole thing is modular
>anyway) into VB.Net.
>
>Does that make it a little clearer? ;-)
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
>Sent: Tuesday, August 23, 2005 4:49 PM
>To: dba-vb at databaseadvisors.com
>Subject: RE: [dba-VB] VB.Net - Hook an open program
>
>
>I think that you are going about this is in a seriously wrong way, JWC.
>IMO,
>you create the jobs and schedule them and keep the FE _way_ out of the
>picture. Unless I am misunderstanding you, you are putting the FE before
>the
>BE -- which IMO is the biggest no-no in the SQL business. To put it another
>way, everything you can blame on MS should be blamed on MS. Set it up in
>the
>BE and DO NOT INTERFERE. Not to say there are no reasons for services, but
>from what you have described thus far, this is NOT one of them. Schedule
>the
>job at a frequency you like, then leave your FEs do realize the results.
>You muddy the waters too much by asking the FEs to muddy the waters. You
>are
>the worm chasing its tail, IMO, in the direction you are going. AF`s Rule
>1:
>everything the BE can do, the BE should do.
>Corollary: no code affecting scheduled sprocs, udfs, etc. should exist in
>the FE.
>
>-----Original Message-----
>From: dba-vb-bounces at databaseadvisors.com
>[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
>Sent: August 22, 2005 11:06 PM
>To: dba-vb at databaseadvisors.com
>Subject: [dba-VB] VB.Net - Hook an open program
>
>I want to load an application that loads scheduled tasks into classes
>from
>a
>database. Once the tasks are loaded I want my service to call this
>application and ask it to run any tasks that the scheduler deems ready to
>run. Is it possible for one program to call another open (running)
>program?
>I would like the scheduler to be part of the service but until the system
>is
>debugged I want the scheduler to be a program with a user interface that I
>can watch. For this reason, the service would cause the scheduler to load,
>and then periodically "call" the scheduler and ask it to check its list of
>tasks and run any as appropriate. Is this possible?
>
>John W. Colby
>www.ColbyConsulting.com
>
>Contribute your unused CPU cycles to a good cause:
>http://folding.stanford.edu/
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
>
>
>
>_______________________________________________
>dba-VB mailing list
>dba-VB at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-vb
>http://www.databaseadvisors.com
>
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
From jwcolby at colbyconsulting.com Fri Aug 26 06:10:30 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 07:10:30 -0400
Subject: [dba-VB] DotNet passing by value
Message-ID: <021f01c5aa2e$c88d7b20$6c7aa8c0@ColbyM6805>
As you might be aware, VB.Net (and I assume the other .net languages as
well) pass all variables by value. But what does this mean, and is it true.
As you know, everything in .net is an object, even common variables such as
an integer or decimal etc. Passing by value (in other languages) means
placing a COPY of the variable (or object in this case) on the stack as the
function is called. In VBA for example, when you pass by value, it really
does ONLY for the simple data types, passing anything else (including
strings) by value.
Imagine passing a string, which could be a million bytes, by value -
literally making a copy and passing that into the stack. IIRC the total
stack space for a given program in an Intel machine is something like 128
kbytes which means that passing a single (huge) string by value could cause
a stack overflow. Now DotNet comes along claiming to pass everything by
value. Is this more doublespeak? And if so, what is the truth?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 07:38:40 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 08:38:40 -0400
Subject: [dba-VB] OT: FireFox not wrapping
Message-ID: <022401c5aa3b$19dacfd0$6c7aa8c0@ColbyM6805>
Does anyone know how to get firefox to wrap to the screen dimensions? I am
viewing MS pages which trail off to the side (have to use the slider) in FF
but wrap correctly in IE.
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From jwcolby at colbyconsulting.com Fri Aug 26 08:15:02 2005
From: jwcolby at colbyconsulting.com (John W. Colby)
Date: Fri, 26 Aug 2005 09:15:02 -0400
Subject: [dba-VB] Passing null values to a function
Message-ID: <022701c5aa40$2dd57580$6c7aa8c0@ColbyM6805>
I have designed a class, with the New widget (constructor) having a set of
parameters, with the parameters type declared.
New(ByVal lintPKID As Int32, ByVal lstrForeignName As String, ByVal
lstrLocalName As String, _
ByVal lintLen As Int16, ByVal lintPosStart As Int16,
ByVal lintPosStop As Int16, _
ByVal lblnActive As Boolean, ByVal lblnCritical As
Boolean, _
ByVal lstrForeignDescr As String, ByVal lstrLocalDescr
As String, _
ByVal lstrFmt As String, ByVal lblnRightJustified As
Boolean, ByVal lstrNotes As String)
The problem I am running in to is that I am loading this stuff from a table.
I have a class that I initialize, which returns a data reader, and I take
the fields from the reader and pass the values in as follows:
Dim lclsData As clsData
Dim lDr As OleDbDataReader
lclsData = New clsData(lstrDataProvider, lstrDataSrc) 'Get an
instance of clsData
lclsData.pSQL = "SELECT * FROM " & lstrTblName & " WHERE ACTIVE =
True;" 'Set the SQL statement
If lclsData.mDrOpen() Then 'Open the reader
Dim lclsFld As clsFld 'dim a variable to hold clsFld instances
lDr = lclsData.pDR 'Get the data reader
While lDr.Read() 'Cycle through the field format records
'Loading the data from each field format record into the
clsFld instance
lclsFld = New clsFld(lDr("PKID"), lDr("ForeignFldName"),
lDr("LocalFldName"), _
lDr("Length"), lDr("PosStart"),
lDr("PosStop"), _
lDr("Active"), lDr("Critical"), _
lDr("ForeignDescr"),
lDr("LocalDescr"), _
lDr("Format"),
lDr("RightJustified"), lDr("Notes"))
The last line is pulling null values out of the "RightJustified" and "Notes"
fields and trying to pass them in. The program is throwing a runtime error
- "cast from type dbNull to type String not valid"
In this specific case I can go in and "fix" the source data but how do I
handle this if nulls are a valid possibility and I want them to be allowed
to be passed in? Do I need to change my parameter type to object (or
untyped)?
John W. Colby
www.ColbyConsulting.com
Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/
From bheid at appdevgrp.com Mon Aug 29 10:33:09 2005
From: bheid at appdevgrp.com (Bobby Heid)
Date: Mon, 29 Aug 2005 11:33:09 -0400
Subject: [dba-VB] VB.Net - RSS reader - I have success...
In-Reply-To: <916187228923D311A6FE00A0CC3FAA30C6DDF2@ADGSERVER>
Message-ID: <916187228923D311A6FE00A0CC3FAA30ABEEEA@ADGSERVER>
Cool! Thanks John.
Bobby
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Wednesday, August 24, 2005 7:11 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - RSS reader - I have success...
Well, I have a vb.net program reading an rss feed and storing fields in a
table. Cooool stuff. When I'm finished massaging the code I'll post it to
show how I did it.
John W. Colby
www.ColbyConsulting.com
From fhtapia at gmail.com Mon Aug 29 13:25:16 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 11:25:16 -0700
Subject: [dba-VB] XML DOM to string?
Message-ID:
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From Jdemarco at hudsonhealthplan.org Mon Aug 29 14:17:48 2005
From: Jdemarco at hudsonhealthplan.org (Jim DeMarco)
Date: Mon, 29 Aug 2005 15:17:48 -0400
Subject: [dba-VB] XML DOM to string?
Message-ID: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Francisco,
I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
Jim DeMarco
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
Sent: Monday, August 29, 2005 2:25 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] XML DOM to string?
I'm messing around w/ XML and it's quite late I suppose since there
really is so much I do not know... what I'm trying to do, I have a
class that I use to create a complex XML, that is:
I can save my xmldom object down to a file, but then I'd have to
re-open it and read it all back into a string, and I wondered since
it's in memory if I can just somehow save it to a string instead...
any clues?
Thanks
WSOrder>
-
-
-
93-1000
10
21222
-
22-2222
5
50101
-
33-3333
33
696969
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com
***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
***********************************************************************************
From fhtapia at gmail.com Mon Aug 29 15:32:24 2005
From: fhtapia at gmail.com (Francisco Tapia)
Date: Mon, 29 Aug 2005 13:32:24 -0700
Subject: [dba-VB] XML DOM to string?
In-Reply-To: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID:
Well I need the XML formated in the way I metioned earlier, that's
because I then make a call to a soap object in which it calls a PICK
database (Unidata) to deliver an order. Originally I had a For XML
call from sql server but I was not able to take that result and stuff
it into a variable, so I did it in VB, I have a class that I use to
create the xml as previously listed, so I finished my document, but
wanted to simply make the soap call when I realized that this was an
object and not a string, thus it wasn't gonna work. My current
solution is to save it temporarily to the disk and re-read it back to
a string variable as a text file using LOF, it works fine, and on my
system is actually really quick, but it was just a bother.
On 8/29/05, Jim DeMarco wrote:
> Francisco,
>
> I'm not quite sure what you need to do. You can create the XML from data in your database and you can persist it into a file. Do you need the ability to read the same XML back into your database (with mods or to receive orders)?
>
> Jim DeMarco
>
> -----Original Message-----
> From: dba-vb-bounces at databaseadvisors.com
> [mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of Francisco Tapia
> Sent: Monday, August 29, 2005 2:25 PM
> To: dba-vb at databaseadvisors.com
> Subject: [dba-VB] XML DOM to string?
>
>
> I'm messing around w/ XML and it's quite late I suppose since there
> really is so much I do not know... what I'm trying to do, I have a
> class that I use to create a complex XML, that is:
>
> I can save my xmldom object down to a file, but then I'd have to
> re-open it and read it all back into a string, and I wondered since
> it's in memory if I can just somehow save it to a string instead...
> any clues?
> Thanks
>
>
> WSOrder>
> -
> FO440
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> -
> 93-1000
> 10
> 21222
>
> -
> 22-2222
> 5
> 50101
>
> -
> 33-3333
> 33
> 696969
>
>
>
>
>
> --
> -Francisco
> http://pcthis.blogspot.com |PC news with out the jargon!
> http://sqlthis.blogspot.com | Tsql and More...
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
>
> ***********************************************************************************
> "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".
> ***********************************************************************************
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>
--
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...
From martyconnelly at shaw.ca Mon Aug 29 17:37:33 2005
From: martyconnelly at shaw.ca (MartyConnelly)
Date: Mon, 29 Aug 2005 15:37:33 -0700
Subject: [dba-VB] XML DOM to string?
References: <08F823FD83787D4BA0B99CA580AD3C74016C3D1E@TTNEXCHCL2.hshhp.com>
Message-ID: <43138E2D.1060204@shaw.ca>
Why not grab the intial html string returned down the wire by the soap
call before you place it in the xmldom.
It would look something like this. Just strip off the envelope xml code
and use the soap body.
Assuming you are using xmlhttp it would be contained in
XMLHTTP.responseXML.xml
rather than XMLHTTP.responseText.