Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 3rd, 2003, 01:33 PM
Registered User
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compiling my first namespace

This question is similar to http://p2p.wrox.com/archive/aspx/2002-01/94.asp, but I didn't see an answer. Just question/answer over and over again.

I am trying to compile this and I am getting an error that System.Data and System.Data.OleDb cannot be found. I even re-installed .NET SDK, but it is giving me the same error.

BTW, This is not complete - I just got to a point I wanted to test. Also, I know that Application variable reference is going to give me a problem. Is there a specific class I shoud import for that? Probably a System.Web class?

Imports System.Data
Imports System.Data.OleDb
Namespace JobTracker
  Public Class JobNumbers

  'returns last job number from either database or application variable
    Private Function GetLastJobNumber(ByVal strSource As String) As Integer

    If strSource = "db" Then
        Dim objConn As New OleDbConnection(ConfigurationSettings.AppSettings( "strConn" ))
        Dim strSQL As String = "Select Last_Job_Number From Admin_Params"
        Dim objComm As New OleDbCommand(strSQL, objConn)
        Dim dr As OleDbDataReader = objComm.ExecuteReader(CommandBehavior.CloseConnect ion)
        If dr.Read() Then
          Return CInt(dr.Item("Last_Job_Number" ))
        End If
        Return CInt(Application("Last_Job_Number" ))
      End If
    End Function
  End Class
End Namespace
Old September 8th, 2003, 11:49 AM
Registered User
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

try this

You need to add a reference to the assembly in the command line like:

vbc /r:system.data.dll,system.dll,otherdllsHere yourvbfile.vb

Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling error sarah lee ASP.NET 1.0 and 1.1 Basics 7 May 31st, 2007 07:24 AM
help with compiling mastrgamr C++ Programming 5 November 13th, 2006 08:04 AM
Compiling MattLeek C# 6 April 30th, 2006 04:57 PM
problem with compiling centy Visual C++ 4 February 8th, 2005 02:27 AM
Compiling Zweiglumen C# 0 February 3rd, 2005 10:38 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.