VB6 Population SQL7


Thread Starter

Raymond Grobler

I have a custom written VB6 App, Connecting to a SQL7 Database with the Following Connect Code:

' Create a Workspace for the Mill Database
Set MILLDB = CreateWorkspace("NewODBCWorkspace", _
"admin", "", dbUseODBC)

' Create the Connection to the Mill database
Set conMILLDB = MILLDB.OpenConnection("MILL_Connection", , , _
& ";UID=" & GlbMillUserName _
& ";pwd=" & GlbMillPassword _
& ";DSN=" & GlbMillDNS)
The VB6 App Formats all Data before writing it to the SQL7 DB Table of data type Real with the following Command:

' Format the Value
Format_3Dec = Format(dblValue, "#######0.000")

The Problem I have is that Sometimes the Data is written correctly, ie. to three decimal places, at other time the data is written at anything from 6 upwards of decimal places. The VB6 App correctly formats the incorrectly written data, I suspect that it is a bug in the SQL driver that I am using, it is the standard SQL driver that is installed when installing SQL7. Has anyone experienced this problem or know of a fix?