Solved

Import namespace problem

Posted on 2004-04-20
3
538 Views
Last Modified: 2012-06-27
I've got the following market.cs file(short version)

******************************************
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;

namespace Market
{
   public class InventoryDB
   {
      public DataTable GetProducts(int categoryID) {

          SqlConnection sqlConnection = new SqlConnection("server=(local)\\NetSDK;database=grocertogo;Trusted_Connection=yes");
          SqlDataAdapter sqlAdapter1 = new SqlDataAdapter("Select * from Products where categoryid=" + categoryID, sqlConnection);

          DataSet products = new DataSet();
          sqlAdapter1.Fill(products, "products");

          return products.Tables[0];
      }
  }
}

*************************************

In my aspx file I import the follwing

**************************************
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Market" %>


<html>
<head>
****************************************

I am, getiing an error on the import namespace market. Does anybody know why this happens?
0
Comment
Question by:waaromikniet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Expert Comment

by:mmarinov
ID: 10867893
hav you add a reference to this namespace ?
0
 
LVL 4

Author Comment

by:waaromikniet
ID: 10868115
How do you mean?

I downloaded a sample from the quicktutorials website. I thought they would work. i am just beginning in .Net can you define what you mean with reference
0
 
LVL 28

Accepted Solution

by:
mmarinov earned 150 total points
ID: 10868429
you have to rebuild the application so you will need market.dll ( which will be imported )
if you use vs - go to your project and add a reference by selecting Market

B..M
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question