Solved

I cant connect to the database using windows 2000 professional ?

Posted on 2006-10-31
4
179 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:
Mamtha1982 earned 500 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 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