Hello,
I have an include file (../../Connections/pricex.inc). That I use to
declare my variables and build my connection string. I tried using the
following, but got the error: Compiler Error Message: BC30188: Declaration
expected. If I move "Response.WriteFile" statement into the sub block, I
get the error that my variables are not declared.
My question is, where and how do I add the include file?
<script runat="server">
Response.WriteFile ("../../Connections/pricex.inc")
Sub Page_Load(Sender As Object, E As EventArgs)
spSearch = New SqlDataAdapter("sp_web_Search " &
"'FindRegionSubRegion','','',''", cnnSearch)
spSearch.SelectCommand.CommandType = CommandType.StoredProcedure
'Close Out the connection
spSearch = Nothing
cnnSearch.Close : cnnSearch = Nothing
End Sub
</script>
--
Thanks in advance,
Steven 2 1197
Hello Steven,
"Steven K" <sk****@troop.com> schrieb im Newsbeitrag
news:uz**************@TK2MSFTNGP12.phx.gbl... Hello,
I have an include file (../../Connections/pricex.inc). That I use to declare my variables and build my connection string. I tried using the following, but got the error: Compiler Error Message: BC30188:
Declaration expected. If I move "Response.WriteFile" statement into the sub block, I get the error that my variables are not declared.
My question is, where and how do I add the include file?
Don't use include files!!!!!!!!!!!!!
first the are not secure! - everybody can read them .... try in the internet
explorer ---> connections/pricex.inc...!!
Make a connection class!
mfg simon g.
I dont think you can do what you are trying to do - variables cannot be
declared like this in .net. You could put them in a class, and invoke an
instance of the class, referencing the variable properties in the class
instead. Then they would be available in your page events.
Regards
John Timney
Microsoft Regional Director
Microsoft MVP I have an include file (../../Connections/pricex.inc). That I use to declare my variables and build my connection string. I tried using the following, but got the error: Compiler Error Message: BC30188:
Declaration expected. If I move "Response.WriteFile" statement into the sub block, I get the error that my variables are not declared.
<script runat="server"> Response.WriteFile ("../../Connections/pricex.inc")
Sub Page_Load(Sender As Object, E As EventArgs)
spSearch = New SqlDataAdapter("sp_web_Search " & "'FindRegionSubRegion','','',''", cnnSearch) spSearch.SelectCommand.CommandType = CommandType.StoredProcedure
'Close Out the connection spSearch = Nothing cnnSearch.Close : cnnSearch = Nothing End Sub </script> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Micha³ Wo¼niak |
last post by:
Ok, I have a nice iface, I have a (hopefully) good user authentication, I
have a DB up-and-running, and I have PHP 4.3.4 (yeah, I know, I will
update...).
What I need is a logging utility. And...
|
by: martino |
last post by:
Hi, I am trying to install NumPy (v23.8) onder Macosx (panther
version). Python (v2.3) is bundled into panther and I installed the
IDE on top of that. After having untarred the source distribution...
|
by: Viviana Vc |
last post by:
How can I programatically do the equivalent of the following:
cacls "C:\Program Files\test" /T /G Everyone:f ?
Thanks,
Viv
|
by: Exits Funnel |
last post by:
Hello,
I'm a little confused about where I should include header files and was
wondering whether there was some convention. Imagine I've written a
class foo and put the definition in foo.h and...
|
by: Bad_Kid |
last post by:
I have cpp 7.1; created a new w32 console aplication project; added existing
items to that project - one .h file (xyz.h) and one .c file; (the files are
not in project's directory)
xyz.h file is...
|
by: Bijay Kumar |
last post by:
Hi Guys,
I was going through the source code of Object class (Object.cs in rotor). What I found is
Equals() implemented as follows:
public extern virtual bool Equals(Object obj);
What...
|
by: amit.man |
last post by:
Hi, i have newbie qestion,
when i write
#include <somthing.h>
the precompiler subtitue that line with the lines from "somthing.h"
header file.
when, where and how the compiler insert the...
|
by: william |
last post by:
My question is: Specific memory block where my pointer pointing to
changed strangely, seemingly that no statement changed it.
Here are two examples I got:
***********1*****************
I was...
|
by: noobles |
last post by:
I'm trying to make a command line parser, but I'm not exactly sure
where to put my file.txt file so that this thing can read it. The most
logical place seemed to be the directory the project was...
|
by: Pablo Suarez |
last post by:
When I code
#include "myheader.h"
then this header file is searched in the current directory.
But where does the compiler search the header file when I write
#include <myheader.h>
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
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,...
|
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...
| |