BUG: 16-bit ODBC Connections Fail on Large Databases (148888)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
  • Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0

This article was previously published under Q148888

SYMPTOMS

A 16-bit Visual Basic program that attempts to connect to a large database fails and displays the error message, "Run-time error '3393.' Can't perform join, group or sort. Combined fields are too long."

STATUS

Microsoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

Use the following steps to work around this issue:

  1. Set the initialization path property of the DBEngine object to the VB.INI file and add the following entry to the VB.INI file:
          [ODBC]
             DisableAsync=1
    						
  2. Place the following line in your code so the Initialization file is found by your application:
          DBEngine.IniPath = "c:\winnt35\vb.ini"
    						

MORE INFORMATION

The following example to reproduce this issue assumes that you have established a connection to your ODBC database. Make the appropriate code changes in this example to connect to your database.

Steps to Reproduce Behavior

  1. Start 16-bit edition of Visual Basic 4.0, or if it is already running, click New Project on the File menu.
  2. Copy the following code to the Code window of the Form1 form:
          Option Explicit
    
          Private Sub Form_Load()
          Dim db As Database
          Dim rs As Recordset
    
          'Change the following two lines to connect to
          ' your ODBC database.
          Set db = OpenDatabase("", False, False, "odbc;")
          Set rs = db.OpenRecordset("select * from bugs")
          rs.MoveLast
          Debug.Print "The End"    'To show you the end of the program.
    
          End Sub
    						
  3. On the Run menu, click Start or press the F5 key to start the program. After connecting to your ODBC database, the program displays the following error message:
    Run-time error '3393.'
    Can't perform join, group, or sort. Combined fields are too long.

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:kbbug KB148888