Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I cant connect to the database using windows 2000 professional ?

Posted on 2006-10-31
4
Medium Priority
?
210 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
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

885 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