473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VB.Net / VBScript Integration

With VB6, I stored a lot of user-defined business rules in a database as
VBScript. The VB application would load and run the script as needed. They
were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net instead of
VBScript, so long as I can still store it as clear text rather than in a
compiled form.)

Jonathan
Nov 21 '05 #1
6 2056
Can you do it as a stored procedure? This seems like a better more
efficient way of going about it.

Chris

"Jonathan Allen" <x@x.x> wrote in message
news:eL****************@TK2MSFTNGP11.phx.gbl...
With VB6, I stored a lot of user-defined business rules in a database as
VBScript. The VB application would load and run the script as needed. They
were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net instead
of VBScript, so long as I can still store it as clear text rather than in
a compiled form.)

Jonathan

Nov 21 '05 #2
No, that wouldn't work. The process is...

1. New record is created OR Existing record is opened
2. User inputs changes
3. User hits "Calculate" button. VBScript auto-fills as many fields as it
can.
4. User overrides any values they need to.
5. User hits "Save" button. VBScript validates form.
6. Data is sent to the database.

Each form has its own rules, and those rules change on a regular basis.
(When I say form, I mean it in the generic sense. I have a single VB Form
that uses info in the database to create the form.)

Jonathan
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:%2****************@TK2MSFTNGP11.phx.gbl...
Can you do it as a stored procedure? This seems like a better more
efficient way of going about it.

Chris

"Jonathan Allen" <x@x.x> wrote in message
news:eL****************@TK2MSFTNGP11.phx.gbl...
With VB6, I stored a lot of user-defined business rules in a database as
VBScript. The VB application would load and run the script as needed.
They were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net instead
of VBScript, so long as I can still store it as clear text rather than in
a compiled form.)

Jonathan


Nov 21 '05 #3
hi Jonathan,

This isn't the answer you asked for, but (my "Dutch Uncle Advice")
forget vbScript, you ought to take a look at xml, which was designed
for exactly what you are doing.

cheers, jw

p.s. In case you haven't tried it, xml is extremely easy to use from vb,
much easier than vbScript. Here are some links:

http://www.thescarms.com/XML/XMLTutorial.asp

http://www.vbwm.com/art_2000/xmlcorner/0902/

http://msdn.microsoft.com/xml/default.aspx
"Jonathan Allen" <x@x.x> wrote in message
news:eL****************@TK2MSFTNGP11.phx.gbl...
With VB6, I stored a lot of user-defined business rules in a database as
VBScript. The VB application would load and run the script as needed. They
were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net instead of VBScript, so long as I can still store it as clear text rather than in a
compiled form.)

Jonathan

Nov 21 '05 #4
How would I convert....

Sub Calculate
Cost = 47.25 * Hours
End Sub
Function Validate
Validate = (Cost >0) OR (Checkbox2.Checked = True)
End Function

.... into XML?

Jonathan

"mr unreliable" <Re**************@notmail.com> wrote in message
news:e6*************@TK2MSFTNGP09.phx.gbl...
hi Jonathan,

This isn't the answer you asked for, but (my "Dutch Uncle Advice")
forget vbScript, you ought to take a look at xml, which was designed
for exactly what you are doing.

cheers, jw

p.s. In case you haven't tried it, xml is extremely easy to use from vb,
much easier than vbScript. Here are some links:

http://www.thescarms.com/XML/XMLTutorial.asp

http://www.vbwm.com/art_2000/xmlcorner/0902/

http://msdn.microsoft.com/xml/default.aspx
"Jonathan Allen" <x@x.x> wrote in message
news:eL****************@TK2MSFTNGP11.phx.gbl...
With VB6, I stored a lot of user-defined business rules in a database as
VBScript. The VB application would load and run the script as needed.
They
were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net instead

of
VBScript, so long as I can still store it as clear text rather than in a
compiled form.)

Jonathan


Nov 21 '05 #5
> With VB6, I stored a lot of user-defined business rules in a database
as VBScript. The VB application would load and run the script as
needed. They were fairly simple, mainly field validation.

Is there a way to do this in VB.Net? (I am willing to use VB.Net
instead of VBScript, so long as I can still store it as clear text
rather than in a compiled form.)


I assume you use the MSScriptControl.ScriptControl to do this from VB6.

You can still use that same COM component via COM interop in VB.Net.

Google Search
http://groups-beta.google.com/groups...=100&scoring=d
Or you can work out the details of being a VSA host and support scripts
written in VB.Net.

Script Happens .NET
http://msdn.microsoft.com/library/en...ng06112001.asp

microsoft.public.dotnet.scripting is the related NG if you go the VSA
route...

--
Michael Harris
Microsoft.MVP.Scripting

Nov 21 '05 #6
> Or you can work out the details of being a VSA host and support scripts
written in VB.Net.


Thanks, I think that will work for me.

Jonathan
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't...
29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
0
by: Wayan | last post by:
Geekcorps Volunteer - Systems Integration Kenya, East Africa Geekcorps http://www.geekcorps.org is in search of systems integration professionals experienced in developing communication systems...
0
by: S Arnold | last post by:
Date: June 24, 2004 Time: 4:00 PM - 5:00 PM (GMT +01:00) Presenter: Richard Curtis Description: iBOLT, Magic's comprehensive EAI and BPM suite was recently described by VP Strategic Services...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
0
by: Stylus Studio | last post by:
Hey Everyone, A new podcast entitled: Business-to-Business Data Integration in a SOA World was just released by ZapThink. The key speakers in the podcast are the following: ZapThink...
6
by: rishabhshrivastava | last post by:
Hello All, I am using ASP.NET 2.0 and I am experiencing a problem using vbscript that is this script on client side is preventing the postback of my controls. I have a dropdownlist which is...
1
by: YellowfinTeam | last post by:
Marketplace: Yellowfin reporting 3.1 with BIRT Integration Yellowfin is proud to announce the release of 3.1. The major theme of this release is enhanced integration capability. We have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.