Solved

I cant connect to the database using windows 2000 professional ?

Posted on 2006-10-31
4
197 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 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Telerik RadEditor Control Save 8 39
Stop Git from being my repository 1 50
Create simple VB.net Add-in for Excel in Office 365 2 60
Read top line from CSV file 14 59
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

751 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