Hi,
I need to do a loop with some criterias that depends on an earlier database
query. I tried to do it this way, but it seems not to accept that the do
is inside the if:
if not objrs.EOF then
Do until updatearray(0) < objrs("updated" )
else
Do While not fso.AtEndOfStre am
end if
Blabla my repeating script here...
Loop
I'm getting this error:
Microsoft VBScript compilation error '800a03fb'
Expected 'Loop'
/x.asp, line 46
else
^
It seems somehow that the do is "stronger" than the if statement, as it didn't
even help doing it this way:
if not objrs.EOF then Do until updatearray(0) < objrs("updated" )
if objrs.EOF then Do While not fso.AtEndOfStre am
What can i do then? The script inside is 10-20 lines, so it would be stupid
copying it to each its do if anything else can be done.
Thank you
--
Regards,
Sune 2 3849
"Sune" <ds*******@vip. cybercity.NOSPA Mdk> wrote in message
news:74******** **************@ dreader.cyberci ty.dk... Hi, I need to do a loop with some criterias that depends on an earlier
database query. I tried to do it this way, but it seems not to accept that the do is inside the if:
if not objrs.EOF then Do until updatearray(0) < objrs("updated" )
'*****stuff to do '****ADD THESE 2 LINES
Loop else Do While not fso.AtEndOfStre am
'**** stuff to do in the loop '****ADD THESE 2 LINES
Loop end if
'****** delete this part Blabla my repeating script here... Loop
I'm getting this error:
Microsoft VBScript compilation error '800a03fb' Expected 'Loop' /x.asp, line 46 else ^
It seems somehow that the do is "stronger" than the if statement, as it
didn't even help doing it this way:
if not objrs.EOF then Do until updatearray(0) < objrs("updated" ) if objrs.EOF then Do While not fso.AtEndOfStre am
What can i do then? The script inside is 10-20 lines, so it would be
stupid copying it to each its do if anything else can be done. Thank you -- Regards, Sune
You can put a loop in an if statement
and you can put an if statement in a loop
whichever you do - you can't do half-way
Either nest it completely - or not at all before the "end if" or the "else"
statement
> You can put a loop in an if statement and you can put an if statement in a loop whichever you do - you can't do half-way Either nest it completely - or not at all before the "end if" or the "else" statement
Thank you very much, your help is appreciated - got it working now.
--
Regards,
Sune This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sathya |
last post by:
I was going through an Boyer-Moore-Horspool pattern match, I saw a
array inside a array, like the below,
skip ] = patlen - i - 1;
The array is decleared as
int skip;
unsigned char *pat;
|
by: Jim P. |
last post by:
I'm having trouble returning an object from an AsyncCallback called inside a
threaded infinite loop.
I'm working on a Peer2Peer app that uses an AsyncCallback to rerieve the
data from the remote peer. I have no problem connecting the peers and
streaming Network Streams. When the incoming data is finished recieving, I
act upon it. This works great as long as all of the code is inside my form.
I want to build the networking code into a...
|
by: Severino |
last post by:
Hi all,
we have developed a .NET component for use inside Windows Forms: this
component has been written using VC++.NET (2003) and is working perfectly
when inserted inside VC#.NET or VB.NET projects; its generated assembly is
inside MyAssembly.dll
When used inside a VC++.NET project it appears correctly over forms at
design time but when trying to compile the project we get the following
error:
|
by: Severino |
last post by:
Hi all,
we have developed a .NET component for use inside Windows Forms: this
component has been written using VC++.NET (2003) and is working perfectly
when inserted inside VC#.NET or VB.NET projects; its generated assembly is
inside MyAssembly.dll
When used inside a VC++.NET project it appears correctly over forms at
design time but when trying to compile the project we get the following
error:
|
by: Matik |
last post by:
Hi to all,
Probably I'm just doing something stupid, but I would like you to tell
me that (if it is so), and point the solution.
There ist the thing:
I' having a sp, where I call other sp inside.
The only problem is, the name of this inside sp is builded variously,
and executed over sp_executesql:
| |
by: Rares Vernica |
last post by:
Hi,
How can I save a reference inside a container?
For example I have:
map<string, unsignedX;
I would like to be able to save a reference to a position inside X.
For a vector, the reference would be the index inside the vector. For
|
by: Test |
last post by:
Is it possibel to have DIV's inside a table cell so that their position can be
given relative to top left corner of the cell. Now the DIVs seem to position
themselves relative to previous object.
|
by: raylopez99 |
last post by:
KeyDown won't work KeyPress fails KeyDown not seen
inspired by a poster here:http://tinyurl.com/62d97l I found some
interesting stuff, which I reproduce below for newbies like me.
The main reason you would want to do this is for example to trigger
something from an OnPaint event without resorting to boolean switches--
say if a user presses the "M" key while the program is Painting, the
user gets the PaintHandler to do something else. ...
|
by: =?Utf-8?B?U2hpdmEgUmFtYW5p?= |
last post by:
I have a windows application with multiple forms & another web application.
Now I need a parent EXE or Application which need to act as a container to
these application.
Example :
My existing Web application : http://localhost/MyApp/Default.aspx
My existing Win Application : existingWinApp.exe
New Parent WinApp : NewWinApp.exe
My new winapp will have a menu & below which I will have a form holder.
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |