FIX: "Not Enough Memory" Error with SQLCOLUMNS() and SQL ServerID: Q224989
|
In some cases, using the SQLColumns() function against a SQL Server table causes the following error:
There is not enough memory to complete this operation.
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
In the code below, the cconstring holds the following values for each parameter:
Driver=SQL Server
Server=Your SQL Server name
UID=Your user ID
PWD=Your password (can be blank for no password)
APP=Microsoft® Visual FoxPro®
WSID=Workstation ID
DATABASE=The database name on SQL Server.
CLOSE DATA ALL
cconstring = "DRIVER=SQL Server;SERVER=SPHINXSQL;UID=sa;PWD=;APP=Microsoft® Visual FoxPro®;WSID=WS2;DATABASE=pubs"
PUBLIC hand
SET SAFETY OFF
DELETE FILE testdb.DBC
DELETE FILE testdb.dc?
CREATE DATA testdb
CREATE CONNECTION testconn CONNSTRING (cconstring)
hand=SQLCONNECT("testconn")
?hand
?SQLColumns(hand,"Publishers","FoxPro","curFields") < 0
*?SQLColumns(hand,"Publishers","FoxPro","curFields")
?sqldisconnect(hand)
Note that the error does not occur every time you use the SQLColumns() function. In the example, if you change this line of code:There is not enough memory to complete this operation.
?SQLColumns(hand,"Publishers","FoxPro","curFields") < 0
to this line:
?SQLColumns(hand,"Publishers","FoxPro","curFields")
the code runs without error.
Additional query words:
Keywords : kbDatabase kbODBC kbSQL kbVFp600 kbVFp600bug KbDBFDBC kbVS600sp3fix kbGrpFox
Version : WINDOWS:3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 25, 1999