473,387 Members | 1,590 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.

Import Namespaces

Hi all,
i've an example where in the page.aspx there are two strings like these:

<% @Import Namespace="System.Data" %>
<% @Import Namespace="System.Data.OleDb" %>

in the page_load sub, using this declarations I Can declare:

Dim objCommand As New OleDbCommand(strSQL, objConn)

i would like to do the same in the page.aspx.vb file but if I use the same
syntax to import System.Data and System.Data.OleDB i get an error.

Could anyone help me? Moreover, I can do the debug of page.aspx.vb file but
not in page.aspx. What' s I doing wrong?

Thanks all

Jena
Nov 18 '05 #1
1 1909
In the VB file, this would be:

Imports System.Data
Imports System.Data.OleDb

The syntax is slightly different than the @Import directive used in
aspx.

Does that help?

--
Scott
http://www.OdeToCode.com

On Tue, 13 Apr 2004 14:39:21 +0200, "Jena" <a.*@hotmail.com> wrote:
Hi all,
i've an example where in the page.aspx there are two strings like these:

<% @Import Namespace="System.Data" %>
<% @Import Namespace="System.Data.OleDb" %>

in the page_load sub, using this declarations I Can declare:

Dim objCommand As New OleDbCommand(strSQL, objConn)

i would like to do the same in the page.aspx.vb file but if I use the same
syntax to import System.Data and System.Data.OleDB i get an error.

Could anyone help me? Moreover, I can do the debug of page.aspx.vb file but
not in page.aspx. What' s I doing wrong?

Thanks all

Jena


Nov 18 '05 #2

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

Similar topics

1
by: Dan Williams | last post by:
Hi people I've just joined the Python list and although I'm sure my question must be asked fairly frequently, I have been unable to find an answer after two days of searching. For the record, my...
5
by: Pekka Niiranen | last post by:
Hi there, I have two scripts. The first "main.py" sets some variables and then imports another called "gen.py". The idea is to provide "main.py" that defines some paths, variables etc. without...
1
by: D. Shane Fowlkes | last post by:
Tw part question: 1 - Is it <% @Import Namespace..... or <%@ Import Namespace... ? I'm seeing it both ways in a book (but I think one is a typo. My pages don't seem to care which it is. Or do...
4
by: Bruce W. Roeser | last post by:
All, I'm reading a book by Charles Petzold (Programming VS.Net). Pretty good content but am confused about the difference. From the text: ...
2
by: Carmit | last post by:
Hi, I'm trying to build a proxy for this webservice: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl I'm getting the following error: Error: Unable to import...
3
by: Neter Smith | last post by:
I have run into a problem when trying to import a WSDL reference under VS 2003 and 1.1 of the framework. It appears as if it is in the generation of the proxy that things are failing. When I...
23
by: Shane Hathaway | last post by:
Here's a heretical idea. I'd like a way to import modules at the point where I need the functionality, rather than remember to import ahead of time. This might eliminate a step in my coding...
9
by: BartlebyScrivener | last post by:
I know this must have been answered a hundred times, but I must be searching on the wrong terminology. Let's say I have a module foo.py that imports os. I make another script called bar.py...
3
by: Chris | last post by:
Hi, 1) In file test.aspx, i put: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %> <%@ import namespace="System.Data"%> <%@ import...
49
by: Martin Unsal | last post by:
I'm using Python for what is becoming a sizeable project and I'm already running into problems organizing code and importing packages. I feel like the Python package system, in particular the...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
Oralloy
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 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.