Results 1 to 9 of 9

Thread: Resolved Connection not working

  1. #1

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41

    Resolved Connection not working

    Here is some code that was working in VB 6.0. I have upgraded my machine to windows xp pro and vb.net. This code now does not work in vb 6.0. I do have mdac 2.6 installed on this machine. I still have both vb 6.0 and vb.net installed also. Can anyone give me some ideas why this does not work. Again any and all help is greatly appreciated.

    CODE:

    Public dbconnect As New ADODB.Connection
    Public dbrec As New ADODB.Recordset

    Private Sub Command1_Click()
    GetConnection
    End Sub
    Public Sub GetConnection()
    Dim message
    dbconnect.Open ("Provider=Microsoft.Jet.OLEDB.3.51;" _
    & "Persist Security Info=False;" _
    & "Data Source=C:\Generator.mdb")

    End Sub

    ERROR MESSAGE RECEIVED:
    Run-time error '-2147024770(8007007e)
    The specified module could not be found.
    Last edited by Tomson; Sep 4th, 2003 at 04:11 PM.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Forget about this code and learn something roubust and new . It's ADO.NET . Search the forum for some tutorials and links .

  3. #3

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41
    I have multiple applications running this connection. I am not going to re-write all the applications in .net. I am learning something new. Why would I have vb.net installed in the first place? Secondly if you can't provide help and only provide pointed words, then leave them to yourself. I am looking for someone who wants to help out. I have found many of them on this site before. Evidently you aren't one of them.

    Thanks

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Easy there turbo I don't think he meant anything by it. I'm confused that looks like VB6 code and its in the VB.NET section, are you using this code in VB6 or VB.NET?

  5. #5

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41
    I understand what you mean by he didn't mean anything by it. I have just been beating my brains trying to get this to work. Maybe I should lighten up. I am using this code in vb 6.0. The reason I posted here is that I have upgraded to vb.net. The previous applications I have developed are in vb 6.0 I have read that any substantial applications should be left in 6.0. To much time required to upgrade large applications. I have both vb6.0 and vb.net so I can program all new applications in vb.net and maintain/support the applications written in vb 6.0. This code worked fine before upgrading to vb.net. I don't know why it isn't working now.

    Thanks again for your help.

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    .NET will install MDAC 2.7 but that shouldn't be the problem either should installing VB.NET. You said you upgraded to Windows XP Pro? Maybe the OS change messed something up. I'd try clearing your ADO references, exit, then go back and set it/them again.

    I was VB.NET and VB6 on the machine and have not had any trouble.

  7. #7

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41
    Thanks for the suggestions. I will try it.
    That may prove to be very useful.

    Thanks again for your help.

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by Tomson
    I have multiple applications running this connection. I am not going to re-write all the applications in .net. I am learning something new. Why would I have vb.net installed in the first place? Secondly if you can't provide help and only provide pointed words, then leave them to yourself. I am looking for someone who wants to help out. I have found many of them on this site before. Evidently you aren't one of them.

    Thanks
    First , sooner or later you will need to learn ADO.NET . So ,my point was to get the hang of it . I didn't mean to disappoint you or anything .

    Second , I know the answer .

    Third , Everybody here knows who is "Pirate" . I know I'm not like Edneeis here but "Don't judge what your small mind cannot comprehend". I help because I believe in this saying :

    [ what you get from life is a return on what you give ] .

  9. #9

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41
    Well I got figured out.

    Public dbconnect As New ADODB.Connection
    Public dbrec As New ADODB.Recordset

    Private Sub Command1_Click()
    GetConnection
    End Sub
    Public Sub GetConnection()
    Dim message

    dbconnect.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
    & "data source=C:\generator.mdb"
    dbconnect.Close
    End Sub

    And pirate, I use this forum for when I need an answer to a question. I don't post until I have researched, researched, and researched some more. I get so tired of searching forums for an answer and have to sort thru 100's of useless comments to finally get to what I am looking for. Yes I am probably not like most. I post my questions, get answers thank all for their help and get out. If you look at my posts I don't waste peoples time with trivial chit chat- with the exception being this post. If you also look when someone needs a question answered, I presume they, like me have researched and as last resort posted their questions. So if I see something I can answer I just post the solution and get out. You can post a reply but as always I am moving on to more productive things.

    Thanks again for all the enlightening advice.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width