Can't see namespace

T

tshad

I am using vb.net VS 2003 and can't seem to see my namespace.

I have 2 files (form1.vb and DBTypes.vb).

My DBTypes.vb is:
************************************************
' Create to new variable types to handle nulls and track changes
' to standard variable types. This is for use with database variables.
' This will tell us if a vaiable has changed, give us the original and
current value,
' and tell us whether the current value and original value is/was null or
not.

imports System
imports System.IO

Namespace FtsData
MustInherit Class DataType
Private _first As Object
Private _data As Object
Private _changed As Boolean = False 'value changed from set
Private nullFirst As Boolean = False
Private nullData As Boolean = False 'current data null

Public Sub New()
End Sub

Public Sub New(initial As Object)
first = initial
data = initial
End Sub

Public Function IsNull() As Boolean
return nullData
End Function

Public Function IsFirstNull() As Boolean
return nullFirst
End Function

Public Sub SetNull()
nullData = true
_data = ""
End Sub

Public Sub SetFirstNull()
nullFirst = true
_first = ""
End Sub

' Properties

Public Property First As Object
Get
return _first
End Get
Set
_first = value
End Set
End Property

Public Property Data As Object
Get
return _data
End Get
Set
_data = value
_changed = true
nullData = false
End Set
End Property

Public Property Changed as Boolean
Get
return _changed
End Get
Set
_changed = value
End Set
End Property
End Class

Class StringType : Inherits DataType
Private _first As String = "" 'original data
Private _data As String = "" 'current data
End Class

End Namespace
**************************************

My vb file is:
****************************
Imports FtsData

Public Class Form1
Inherits System.Windows.Forms.Form

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim temp As StringType
End Sub
End Class
**************************

I am getting 2 errors:

Namespace or type 'FtsData' for the Imports 'FtsData' cannot be found.

and

Type 'StringType' is not defined.

But I have the Imports statement and StringType is in the DBTypes.vb file.

What am I missing?

Thanks,

Tom
 
A

Armin Zingler

tshad said:
I am using vb.net VS 2003 and can't seem to see my namespace.

I have 2 files (form1.vb and DBTypes.vb).

My DBTypes.vb is:
************************************************
' Create to new variable types to handle nulls and track changes '
to standard variable types. This is for use with database
variables. ' This will tell us if a vaiable has changed, give us the
original and current value,
' and tell us whether the current value and original value is/was
null or not.

imports System
imports System.IO

Namespace FtsData


My vb file is:
****************************
Imports FtsData

I am getting 2 errors:

Namespace or type 'FtsData' for the Imports 'FtsData' cannot be
found.

and

Type 'StringType' is not defined.

But I have the Imports statement and StringType is in the DBTypes.vb
file.

What am I missing?

Use the full qualified name

Imports Rootnamespace.FtsData

where Rootnamespace is the projects's root namespace in the project
properties.


Armin
 
T

tshad

Armin Zingler said:
Use the full qualified name

Imports Rootnamespace.FtsData

where Rootnamespace is the projects's root namespace in the project
properties.

That was it.

It was:

DBTypesVB.FtsData.

Not sure why this is.

In my other project where I am using this Dll and calling it from
DreamWeaver in my Asp.Net Pages, I only put in "Imports FtsData". Why do I
need to put the projects Namespace in it here?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top