BUG: 16-bit ODBC Connections Fail on Large Databases

ID: Q148888

4.00    | 4.00
WINDOWS | WINDOWS NT kbprg kbbuglist

The information in this article applies to:

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

7. 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.

KBCategory: kbprg kbbuglist KBSubcategory: APrgDataOther Additional reference words: 4.00 vb4win vb416 buglist4.00
Keywords          :  kbbuglist
Version           : 4.00    | 4.00
Platform          : NT WINDOWS

Last Reviewed: March 29, 1996