473,610 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DTS VBScript help - please??

Sorry about the cross post but M$ apparently does not have a "VBScript sucks"
newsgroup and I know this group is heavily traffic-ed. Can anyone tell me
how to make this script WORK? I have a deadline to meet and the only thing
between me and success is VBScript...

I have tried this in several forms, for amusement I am only posting two
forms that fail. Does anyone understand WTF is happening here? In both
cases the script explodes on the second line of code {the "begin" line} with
a type mismatch; WTF?

Function Main()
if 1 <> 2 then
begin
Main = DTSTransformSta t_SkipInsert
else
Main = DTSTransformSta t_Ok
end if
End Function

-------- And a second form: -------------

Function Main()
if true then
begin
Main = DTSTransformSta t_SkipInsert
else
Main = DTSTransformSta t_Ok
end if
End Function
Nov 17 '05 #1
1 1282
"Richard" <Ri*****@discus sions.microsoft .com> wrote in message
news:F2******** *************** ***********@mic rosoft.com...
Function Main()
if 1 <> 2 then
begin
Main = DTSTransformSta t_SkipInsert
else
Main = DTSTransformSta t_Ok
end if
End Function


I suspect the problem is the "begin", which is not part of VBScript syntax.
The syntax of the If statement 9from MSDN) is:
If condition Then
[statements]
[ElseIf condition-n Then
[elseifstatement s]] . . .
[Else
[elsestatements]]
End If Chris Jobson
Nov 17 '05 #2

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

Similar topics

5
6817
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 understand the differences between ASP JavaScript and ASP VBScript?? Because JavaScript is client-side technology, and ASP is server side technology. I think VBScript is used to implement ASP pages.
16
9338
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 times it returns VarType() is vbEmpty. This is driving me mad! Also, does anyone know what the properties and methods are for the object returned by GetRef()? TIA.
5
2126
by: Leszek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main menu and report page. Tomorrow to the 8 a.m. i must do this, but i don't know how.... Can someone help me? There are few messageboxes for help. Here is my code (it's vbs):
4
2512
by: client site dll in vbscript | last post by:
Hi i have one dll on client site,i want to use it in aspx page, on clinet site Is it possible or not .Please tell me the solution Please email me at indipren@hotmail.com Regarda Indi
10
4692
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript", you cannot use inline JavaScript statements that call setTimeout with functions that start with a double-underscore. This is very relavant to ASPX (ASP Dot Net) pages because it means that AutoPostBacks will fail since they generally call the...
6
1946
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 supposed to perform some fucntion when the selected index is changed, it works fine without vbscript code(when i comment out that code) but when I uncomment the code the postback dosen't happen.
7
5788
by: dkiernan | last post by:
I am stumped. I have several websites running on a 2003 IIS6 box, all running basically the same code (each site has its own home directory and copy of the code). All are running in the same App Pool. One site gives the 800a0006 error on a formatpercent, another site (on the same server) does not. Here's the kicker...the one site only fails if the number is LESS THAN 1.
3
8538
by: Michael | last post by:
Hi. I have COM+ component installed on my XP. I have problem to create instance of it inside vbscript. How can I do it? The error I get is : ActiveX component can't create object. Thanks
2
8510
by: moodyman13 | last post by:
Hi All, I’m in a bit of pickle with ASP and VBscript variable and hope someone could get me some advice. There’s a FORM’ I’ve created in ASP and its purpose is to capture the name(s) of users. The plan is then to pass the information from ASP to VBScript. My dilemma is how to extract the information in ASP and use it in VBScript. (Please see code below) I’ve read in some forums that is simply can’t be done. Unfortunately, I can’t run...
1
1765
by: Igor Ladnik | last post by:
We are dealing with .NET server component and COM clients written with VB6 and VBScript. And there are some problems we faced (please see code below). 1. Managed type System Drawing.Color is automatically marshaled to VB type OLE_COLOR only in case of early binding. (see DealWithColor() method). 2. For class Component public variable DateTime dt can be used in both early and late binding cases, whereas public variable Color clr causes...
0
8146
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8096
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8558
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8411
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7031
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4037
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4104
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2541
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.