Good Morning,
I am new to .Net so forgive me if this is question is kind of out there. Is there a way to consolidate multiple Dim statements for Sql Commands? I have a page that has around 50 Dim statements for Sql Commands and was wondering if there was a way much like an array where I could just do something like:
Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks,
Keith 5 2282
i am not sure whether you need all the 50 commands at the same time !!!
if you dont i would advise you to have an array of sql command text and then
use something like Microsoft Data Access Application Block to create the
corresponding amout.
Even then i am not sure whether this is the best advice. If you could write
a bit more on what you are trying to achieve, maybe someone around here will
be able to answer your question in a better way.
--
Regards,
Hermit Dave
( http://hdave.blogspot.com)
"Keith" <kc****@hotmail .com> wrote in message
news:ez******** *****@TK2MSFTNG P12.phx.gbl...
Good Morning,
I am new to .Net so forgive me if this is question is kind of out there. Is
there a way to consolidate multiple Dim statements for Sql Commands? I have
a page that has around 50 Dim statements for Sql Commands and was wondering
if there was a way much like an array where I could just do something like:
Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks,
Keith
You can have an array of SqlCommands, or you could simply keep reusing the same name and reinstantiate it
dim command as SqlCommand
for i as integer = 0 to 50
command = new SqlCommand()
command.dispose ()
next i
karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Keith" <kc****@hotmail .com> wrote in message news:ez******** *****@TK2MSFTNG P12.phx.gbl...
Good Morning,
I am new to .Net so forgive me if this is question is kind of out there. Is there a way to consolidate multiple Dim statements for Sql Commands? I have a page that has around 50 Dim statements for Sql Commands and was wondering if there was a way much like an array where I could just do something like:
Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks,
Keith
I have a page that where someone can select a date (JAN 04) from a dropdown
list. When they click submit it returns the given results for 5 different
locations (Just simple Select statements). So I would say I need all those
commands at the same time. Right now I have the following:
Dim cmdSelect1 as SqlCommand
Dim cmdSelect2 as SqlCommand
etc
etc
Thanks,
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message
news:OZ******** ******@TK2MSFTN GP10.phx.gbl... i am not sure whether you need all the 50 commands at the same time !!! if you dont i would advise you to have an array of sql command text and
then use something like Microsoft Data Access Application Block to create the corresponding amout. Even then i am not sure whether this is the best advice. If you could
write a bit more on what you are trying to achieve, maybe someone around here
will be able to answer your question in a better way.
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Keith" <kc****@hotmail .com> wrote in message news:ez******** *****@TK2MSFTNG P12.phx.gbl... Good Morning,
I am new to .Net so forgive me if this is question is kind of out there.
Is there a way to consolidate multiple Dim statements for Sql Commands? I
have a page that has around 50 Dim statements for Sql Commands and was
wondering if there was a way much like an array where I could just do something
like: Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks, Keith
consider using a stored procedure instead of direct select commands and you
can get multiple recordsets
as long as the datasource is the same you select command can indeed return
more than one recordsets
--
Regards,
Hermit Dave
( http://hdave.blogspot.com)
"Keith" <kc****@hotmail .com> wrote in message
news:OE******** ********@TK2MSF TNGP10.phx.gbl. .. I have a page that where someone can select a date (JAN 04) from a dropdown list. When they click submit it returns the given results for 5 different locations (Just simple Select statements). So I would say I need all those commands at the same time. Right now I have the following:
Dim cmdSelect1 as SqlCommand Dim cmdSelect2 as SqlCommand etc etc
Thanks,
"Hermit Dave" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message news:OZ******** ******@TK2MSFTN GP10.phx.gbl... i am not sure whether you need all the 50 commands at the same time !!! if you dont i would advise you to have an array of sql command text and then use something like Microsoft Data Access Application Block to create the corresponding amout. Even then i am not sure whether this is the best advice. If you could write a bit more on what you are trying to achieve, maybe someone around here will be able to answer your question in a better way.
--
Regards,
Hermit Dave (http://hdave.blogspot.com) "Keith" <kc****@hotmail .com> wrote in message news:ez******** *****@TK2MSFTNG P12.phx.gbl... Good Morning,
I am new to .Net so forgive me if this is question is kind of out there. Is there a way to consolidate multiple Dim statements for Sql Commands? I have a page that has around 50 Dim statements for Sql Commands and was wondering if there was a way much like an array where I could just do something like: Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks, Keith
Thanks for everyone's input.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:Ow******** ******@TK2MSFTN GP10.phx.gbl...
You can have an array of SqlCommands, or you could simply keep reusing the same name and reinstantiate it
dim command as SqlCommand
for i as integer = 0 to 50
command = new SqlCommand()
command.dispose ()
next i
karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Keith" <kc****@hotmail .com> wrote in message news:ez******** *****@TK2MSFTNG P12.phx.gbl...
Good Morning,
I am new to .Net so forgive me if this is question is kind of out there. Is there a way to consolidate multiple Dim statements for Sql Commands? I have a page that has around 50 Dim statements for Sql Commands and was wondering if there was a way much like an array where I could just do something like:
Dim cmdSelect(50) as Sql Command
This may be far fetched, but just thought I would ask.
Thanks,
Keith This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sveta |
last post by:
Hi, all!
I am new with J2ME.
I have application that has form with 2 commands (exit and select).
All UI uses are high level API, and it is very important to leave it
high-level.
This application works fine on some devices. But at Samsung mobile
phone, I have a problem.
In this phone my 2 commands appear under menu command, and then I can
|
by: Tom |
last post by:
I want to open a recordset object on an .asp page. When I open the
recordset I would like to use a stored procedure that expects a parameter to
be passed for the stored procedure. I will then use the recordset to loop
thru the recordset, update values from the recordset and then update the
database by passing parmeters to another stored procedure. I would like to
use the recordset object but can it be used to pass a parameter to a stored...
|
by: Siemel Naran |
last post by:
Hi. I'm writing a command shell that reads commands from standard input.
At this point I have the command in a std::string. Now I want to execute
this command in the shell. From the Borland newsgroups I learned that there
is a function in stdlib.h called system.
int system(const char *command);
First question, is the system command ANSI compliant. Because I include
<cstdlib> and write std::system(command.c_str()); it looks like an...
|
by: Todd McNeill |
last post by:
Hi-
Something was just pointed out to me this morning. According to the
V8 Command Reference, the RUNSTATS command no longer uses the SHRLEVEL
CHANGE/REFERENCE clauses, and it looks to be replaced with ALLOW
READ/WRITE ACCESS. Is SHRLEVEL still a valid clause and
interchangable with ALLOW..., or has it been deprecated and is it, or
will it eventually become, invalid? We currently are not seeing any
errors using SHRLEVEL in our...
|
by: Knepper, Michelle |
last post by:
Hi out there,
I'm a first-time user of the "Copy ... From..." command, and I'm trying
to load a table from a text flat file.
http://www.postgresql.org/docs/7.4/static/sql-copy.html
I don't know if I'm using the command correctly.
Question: I run this command as a superuser, and the "copy from"
command is run like a SQL command on the command line, correct?
| |
by: djc |
last post by:
I'm new to this and was wondering what the options are for interpreting the
command line using a CLI program. Specifically methods for interpreting the
parameters passed to the program on the command line.
I noticed that visual studio adds the following for you when creating a new
CLI program:
void main(string args)
{
}
|
by: ttan |
last post by:
I'm using c# to called a command line netsh ipsec static.... and the group
policy store it on local even those I used "ipsec static set store
location=domain"
my question is how do I keep the command line is in the netsh eviroment?
protected virtual void Init()
{
// set Process invariant part of startup info
m_proc.StartInfo.CreateNoWindow =
|
by: Ojas |
last post by:
Hi!,
I just out of curiosity want to know how top detect the client side
application under which the script is getting run. I mean to ask the
how to know whether the script is running under Command Prompt or
Browser or some other application?
Ojas.
|
by: alexcpn |
last post by:
Hi I have a Command class of type
class Command
{
T* m_objptr;
void (T::*method)();
:
explicit Command(T* pObj,void (T::*p_method)(),long timeout,const
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: 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...
| |