<div><font size="2" face="Arial">Please help me. </font></div>
<div><font size="2" face="Arial">I am trying to switch from VisualWorks to Squeak 
but I can&#39;t connect to any my DB2 and Oracle databases.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">I am using this files:</font></div>
<div><font size="2" face="Arial"><a href="ftp://ftp.squeak.org/3.10/win/SqueakVM-Win32-3.10.6-bin.zip" target="_blank">ftp://ftp.squeak.org/3.10/win/SqueakVM-Win32-3.10.6-bin.zip</a></font></div>
<div><font size="2" face="Arial"><a href="ftp://ftp.squeak.org/3.10/Squeak3.10.2-7179-basic.zip" target="_blank">ftp://ftp.squeak.org/3.10/Squeak3.10.2-7179-basic.zip</a></font></div>
<div><font size="2" face="Arial"><a href="http://ftp.squeak.org/3.0/platform-independent/SqueakV3.sources.gz" target="_blank">http://ftp.squeak.org/3.0/platform-independent/SqueakV3.sources.gz</a></font></div>
<div><font size="2" face="Arial"><a href="http://map.squeak.org/accountbyid/cf58c358-46ee-465e-b6db-2740e9b32a53/files/InstallFFI4.st" target="_blank">http://map.squeak.org/accountbyid/cf58c358-46ee-465e-b6db-2740e9b32a53/files/InstallFFI4.st</a></font></div>


<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">At first I tried old ODBC code from </font></div>
<div><font size="2" face="Arial"><a href="http://wiki.squeak.org/squeak/uploads/2480/ODBC-dgd.10.cs.gz" target="_blank">http://wiki.squeak.org/squeak/uploads/2480/ODBC-dgd.10.cs.gz</a></font></div>
<div><font size="2" face="Arial">and got &quot;Could not coerce arguments&quot; at my win32 
(XP and Windows 2003 Server) computers. I can&#39;t understand this because all 
seems right. At SqueakDebug.log we can see </font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">------------------------------------<br>Error: Could not coerce arguments<br>28 May 2009 4:18:23 pm<br><br>VM: Win32 - a SmalltalkImage<br>Image: Squeak3.10.2 [latest update: #7179]<br><br>
SecurityManager state:<br>Restricted: false<br>FileAccess: true<br>SocketAccess: true<br>Working Dir C:\squeak\1<br>Trusted Dir C:\squeak\1\vvm<br>Untrusted Dir C:\My Squeak\vvm<br><br>ODBCLibrary(Object)&gt;&gt;error:<br>
    Receiver: an ODBCLibrary<br>    Arguments and temporary variables: <br>        aString:     &#39;Could not coerce arguments&#39;<br>    Receiver&#39;s instance variables: <br>        handle:     @ 16r4BF70000<br>        name:     &#39;odbc32&#39;<br>
<br>ODBCLibrary(Object)&gt;&gt;externalCallFailed<br>    Receiver: an ODBCLibrary<br>    Arguments and temporary variables: <br>        errCode:     6<br>    Receiver&#39;s instance variables: <br>        handle:     @ 16r4BF70000<br>
        name:     &#39;odbc32&#39;<br><br>ODBCLibrary&gt;&gt;sqlBindCol:columnNumber:targetType:targetValue:bufferLength:strLength:<br>    Receiver: an ODBCLibrary<br>    Arguments and temporary variables: <br>        statementHandle:     a SQLHSTMT<br>
        columnNumber:     1<br>        targetType:     1<br>        targetValue:     an ExternalData<br>        bufferLength:     8192<br>        strLenght:     a SQLInteger<br>    Receiver&#39;s instance variables: <br>        handle:     @ 16r4BF70000<br>
        name:     &#39;odbc32&#39;<br><br>ODBCColumn&gt;&gt;bindBuffer<br>    Receiver: an ODBCColumn DUMMY (VarChar 1 nullable)<br>    Arguments and temporary variables: <br>------------------------------------<br></font></div>

<div><font size="2" face="Arial">where</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">sqlBindCol: statementHandle columnNumber: 
columnNumber targetType: targetType targetValue: targetValue bufferLength: 
bufferLength strLength: strLenght <br> &quot;SQLRETURN  <br> SQLGetData(  
<br> SQLHSTMT StatementHandle,  <br> SQLUSMALLINT ColumnNumber, <br> SQLSMALLINT 
TargetType,  <br> SQLPOINTER TargetValue, <br> SQLINTEGER BufferLength,  
<br> SQLINTEGER *StrLen_or_Ind);&quot;<br> &lt;cdecl: short &#39;SQLBindCol&#39; (SQLHSTMT 
ulong short void* long SQLInteger*)&gt;<br> ^ self 
externalCallFailed</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">I think all types are correct.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">Also at Windows 2003 x64 I receive 
&quot;Error:[Microsoft][ODBC Driver Manager] Data source name not found and no 
default driver specified [State:IM002]&quot; for any datasource.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">After that I am trying ODBC code from </font><font size="2" face="Arial"><a href="http://www.squeaksource.com/ODBC/ODBC-rjl.10.mcz" target="_blank">http://www.squeaksource.com/ODBC/ODBC-rjl.10.mcz</a></font></div>


<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">| con rs |<br>con _ ODBCConnection dsn:&#39;somedsn&#39; 
user:&#39;somename&#39; password:&#39;somepwd&#39;.<br>rs := con resultSetFor: &#39;SELECT &#39;&#39;xxx&#39;&#39; 
manana FROM dual&#39;.<br>(con query: &#39;SELECT &#39;&#39;xxx&#39;&#39; manana FROM dual&#39;) results 
do:[:row | Transcript show: row; cr].</font></div>
<div><font size="2" face="Arial">con close.</font></div>
<div><font size="2" face="Arial"></font> </div>
<div><font size="2" face="Arial">squeak image crashes somewhere near calling of &quot;con 
resultSetFor:&quot;. No SqueakDebug.log generated in this case.  Crash.dmp contains:<br></font><font size="2" face="Arial">------------------------------------<br>---------------------------------------------------------------------<br>
Mon Jun 01 10:37:54 2009<br><br>Exception code: C0000005<br>Exception addr: 0040BD85<br>Access violation (read access) at 91233BDA<br>EAX:91233BDA    EBX:96A4E35C    ECX:00000003    EDX:96A4E35F<br>ESI:11233B78    EDI:91233BDB    EBP:0000138C    ESP:0006F998<br>
EIP:0040BD85    EFL:00010286<br>FP Control: FFFF027F<br>FP Status:  FFFF5061<br>FP Tag:     FFFFFFFF<br><br>Hardware information: <br>    Manufacturer: Unknown<br>    Model: Unknown<br>    Number of processors: 1<br>    Page size: 4096<br>
<br>Memory Information (upon launch):<br>    Physical Memory Size: 2097151 kbytes<br>    Physical Memory Free: 1681472 kbytes<br>    Page File Size: 4194303 kbytes<br>    Page File Free: 4194303 kbytes<br>    Virtual Memory Size: 2097151 kbytes<br>
    Virtual Memory Free: 2064020 kbytes<br>    Memory Load: 40 percent<br><br>Processor 0: AMD Athlon(tm) 64 Processor 3400+<br>    Identifier: x86 Family 15 Model 12 Stepping 0<br>    ~MHZ: 2411<br><br>Operating System: Microsoft Windows Server 2003 (Build 3790 Service Pack 1)<br>
    Registered Owner: unnamed user<br>    Registered Company: unknown organization<br>    SP major version: 1<br>    SP minor version: 0<br>    Suite mask: 110<br>    Product type: 3<br><br>Display Information: <br>    Graphics adapter name: NVIDIA GeForce4 Ti 4200<br>
    Primary monitor resolution: 1024 x 768<br><br>Device: NVIDIA GeForce4 Ti 4200<br>    Adapter String: GeForce4 Ti 4200<br>    Bios String: Version 4.25.00.29.00<br>    Chip Type: GeForce4 Ti 4200<br>    DAC Type: Integrated RAMDAC<br>
    Memory Size: 0x04000000<br><br>Driver Versions:<br>    nv4_disp: 6.14.10.9371<br><br>VM Version: Squeak 3.10.6 (release) from Aug 30 2007<br>Compiler: gcc 2.95.2 19991024 (release)<br><br>Current byte code: 200<br>Primitive index: 264<br>
<br>Loaded plugins:<br>    odbc32<br>    SqueakFFIPrims 1 February 2007 (e)<br>    LargeIntegers v1.5 1 February 2007 (i)<br>    Matrix2x3Plugin 1 February 2007 (i)<br>    FloatArrayPlugin 1 February 2007 (i)<br>    BitBltPlugin 1 February 2007 (i)<br>
    B2DPlugin 1 February 2007 (i)<br>    SecurityPlugin 1 February 2007 (i)<br>    FilePlugin 1 February 2007 (i)<br>    MiscPrimitivePlugin 1 February 2007 (i)<br><br><br>Stack dump:<br></font><font size="2" face="Arial">------------------------------------</font><font size="2" face="Arial"> <br>
<br>(Sorry for my English)<br>Victor<br><br></font></div>