Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I cant connect to the database using windows 2000 professional ?

Posted on 2006-10-31
4
Medium Priority
?
205 Views
Last Modified: 2010-04-23

My program work perfectly with computers that contain window xp operating system using OleDb in order to connect to access database, but it will fail to connect to the database using window 2000 pro operating.
 


however, I have install framework 2.0 +  framework 1.1 .
0
Comment
Question by:waddhah
[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
4 Comments
 
LVL 12

Accepted Solution

by:
Praveen Kumar earned 1500 total points
ID: 17842275
Is that system installed Ms-Access or Microsoft Data Access Components (MDAC) ?
What error you are getting?
0
 
LVL 2

Expert Comment

by:jags_77
ID: 17842388
Hi there  waddah:


  i´ve used and tested this procedure on Windows 2000 and 2003:


- - - - Below the Inherits statement, enter the following:

Private strOLEDB_ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =C:\Program Files\Microsoft Office\Office\Samples\Nortwind.mdb;"       - - - -  Just make sure the path is the correct one

Private cnOLEDB As New Oledb.OleDbConnection(strOLEDB_ConnectionString)



Private daCustomers As New Oledb.OleDbDataAdapter( "Select * from Customers",cnOLEDB)

Private cbCustomers As New Oledb.Oledb.CommandBuilder(daCustomers)

Private dsExamples As New DataSet("dsExamples")


- - - In a defined procedure load the data from your DB


Private Sub mnuOLEDB_ LoadData_Click ( )
daCustomers.Fill ( dsExamples, "Customers")

Dim dcCustomerID As DataColumn=dsExamples.Tables("Customers").Columns("CustomerID")

dsExamples.Relations.Add("CustOrders",dcCustomerID,dcOrderCustID)


hope this is useful..if you need something more please feel free to ask...









0
 

Author Comment

by:waddhah
ID: 17842805
I have used the falowing code .. what changes do I have to do ?

Try
            Dim dbCommand As OleDbCommand
            Dim DBConn As OleDbConnection
            Dim strFN, strLN As String
            Dim DBInsert As New OleDbCommand
            strFN = txtF.Text
            strLN = txtL.Text
            strDept = LocationBox.SelectedItem
            strPath = txtPath.Text
            DBConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source =C:\db.mdb;)" _
            DBInsert.CommandText = "Insert Into Employee " _
            & "(FName,LName) " _
            & "Values (" _
            & "'" & strFN & "', " _
            & "'" & strLN & "')"
            DBInsert.Connection = DBConn
            DBInsert.Connection.Open()
            DBInsert.ExecuteNonQuery()
            DBConn.Close()
        Catch err As System.Exception
            txtError.Text = err.Message
        End Try

... as I said before it work  in window xp only?

and tomorow  I will check the error msg and I will post it  , because I'm now  in home not in my company.
0
 

Author Comment

by:waddhah
ID: 17953478
I just have solve the problem by installing the MDAC 2.8
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

704 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