Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2003
    Location
    Amsterdam
    Posts
    18

    Unanswered: Runtime error '3704'

    Hi,

    I've created an application that runs on several pc's. However, on one particular pc, when I run the following code to test the connection to the SQL server, it generates the error "Runtime error '3704'" and it happens only when it hits the Form1.Users.Movefirst section.

    I've checked all the user permissions on the server and dont seem to find any difference there.

    code:-

    Option Explicit
    Public Db As New ADODB.Connection
    Public Users As New ADODB.Recordset

    Private Sub Command1_Click()

    If Not Form1.Users.BOF Then
    Form1.Users.MoveFirst
    End If

    With Form1.Users
    Do While Not Form1.Users.EOF
    Debug.Print Form1.Users.Fields(0)
    Form1.Users.MoveNext
    Loop
    End With

    End Sub

    Private Sub Form_Load()

    On Error Resume Next
    Set Db = Nothing

    Db.Open _
    "Provider=SQLOLEDB.1;Server=File;" & _
    "Database=Cash Management;Trusted_Connection=Yes"

    'Open the recordsets
    With Form1.Users
    .CursorLocation = adUseClient
    .CursorType = adOpenDynamic
    .LockType = adLockOptimistic
    .ActiveConnection = Form1.Db
    .Source = "Select * from Users order by userid"
    .Open "SET NOCOUNT ON"
    End With

    End Sub

    Thanks

  2. #2
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    It is very simple. You are running "SET NOCOUNT ON" only. What MDAC version do you use?

  3. #3
    Join Date
    Mar 2003
    Location
    Amsterdam
    Posts
    18
    Hi.. Thanks for your reply. Normally, my .open has nothing after it. Only after I searched on the net, did I add that "Set NoCount On", but it didn't help. Sorry to sound ignorant, but how do I tell what ver of MDAC I'm using ?

    Carl

  4. #4
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    Q1. What MDAC version am I using?
    A1. Use regedit.exe, see branch "HKEY_LOCAL_MACHINE\Software\Microsoft\DataAcc ess" node "FullInstallVer"

  5. #5
    Join Date
    Mar 2003
    Location
    Amsterdam
    Posts
    18
    It looks like 2.70.7713.4.

    Tks..

  6. #6
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    You added "SET NOCOUNT ON" for test purposses only, remove it.
    In your code, after the part where you try to open a connection,
    add a check (+msgbox) to know if it is really connected.
    It can be a domain security problem.

  7. #7
    Join Date
    Mar 2003
    Location
    Amsterdam
    Posts
    18
    Ok - I checked the registry on the pc that I was installing on and I see the version of MDAC is 2.53.6200.1. This is the same as another pc that is working.

    If this is not the problem, I suspect that it is a permissions problem, but I have no idea where to check as this user has been registered exactly the same as the other users that work.

    Thanks

  8. #8
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    Run (for W9x)
    command /K net config
    from Start->Run commandline on the client machine and you will see his logon info (or ask him to do it and send results).

  9. #9
    Join Date
    Mar 2003
    Location
    Amsterdam
    Posts
    18
    My email address is alkemac@hotmail.com. Can you please send an email and I will reply with screen shots of the different screens, including the SQL Svr user registration screen ?

    Thanks

  10. #10
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    It was a user default database problem. The user solved it by himself.

  11. #11
    Join Date
    Jun 2003
    Posts
    1
    What do you mean by "default database problem"? Can you explain how the user solved it himself? We have a similar problem with a VB application that opens an Access database. It runs on most computers, but not some. One gets the 3704 runtime error. Thanks.

Posting Permissions

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