My name is Martin Leduc from Solution Globale, Chicoutimi.  We are interested by a 
MySQL Solution, but we have a big problem and we dont know how to solve this one.

We use MyODBC 2.50.37 and MySQL 3.23.36 to 38 (bug fixed) and we have anytime the same 
trouble.  Null value with NOT NULL TEXT fields.

This is our Test Example:

We use de DB Test:

CREATE TABLE t_testnull (
 ID tinyint(4) NOT NULL  auto_increment, 
 TestTEXTNotNULL text NOT NULL  , 
 TestTEXTNull text    ,
 PRIMARY KEY (ID) 
);

We use Visual Basic 6.0 with SP 5, and our code is:

Private WithEvents con_Test As ADODB.Connection
Private WithEvents rs_Test As ADODB.Recordset

Private Sub Form_Load()
    Set con_Test = New ADODB.Connection
    Set rs_Test = New ADODB.Recordset
    str_ConnectionString = "DRIVER={MySQL}" & _
                           ";DB=test" & _
                           ";SERVER=localhost" & _
                           ";UID=root" & _
                           ";PWD=" & _
                           ";PORT=3306" & _
                           ";OPTION=131072;STMT=;"

    con_Test.ConnectionString = str_ConnectionString
    con_Test.Open
    rs_Test.Open "INSERT INTO t_TestNull (testTEXTNotNULL,TestTEXTNull) VALUES 
('','');", con_Test
    rs_Test.Open "SELECT * FROM T_TestNULL", con_Test
    Do Until rs_Test.EOF = True
        Debug.Print rs_Test.Fields(1).Value; rs_Test.Fields(2).Value
        rs_Test.MoveNext
    Loop

End Sub

and this code give me always NULL from MySQL database.  I tried many options of MyODBC 
but these didn't work.  We have tried with the Addnew Method but it gave the same 
results.  

On your FAQ Site, you tel to use the Recordset.Cursorlocation = adUseClient, but this 
action return me a E-FAIL Status and when I tried to use the MoveLast method ADO tell 
me that "Rowset does not support fetching backward".


Our Server is Windows 2000 Server with AMD K62-380 CPU, 97Mo RAM.  We have tried with 
a PIII 600 with 380 MoRAM with Windows 98, and the same things is happening.  Did 
someone can tell me what happend because this NULL value is a nightmare.  We are not 
familiar with this technologie and we want to change for MySQL but we have to find 
this problem fastly.

Do you know how to link libMYSQL.dll like a Windows DLL in VB?

DECLARE FUNCTION mysql_init FROM.....

and the kind of TYPE we had to declare.

The NULL Value is the most important think to solve.
------------------------------------------------------------------------------------------------------------------

Martin Leduc
Project Manager, Solution Globale
Chicoutimi, Québec Canada
(418) 545-0005
[EMAIL PROTECTED]

Reply via email to