473,320 Members | 1,856 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,320 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 1908
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.