Página 1 de 1

Poblem with TSQLTable

Publicado: Dom Jul 12, 2009 12:12 pm
por Guest
Hi!
I just switched from 1.9.8 to the latest 2.0 beta and have a problem with
TQLTable.
Adding new records to an MS Access table I get this error:
[Microsoft][ODBC Microsoft Access Driver] Field 'Artikel.Matchcode' can´t be
a string with length zero. [# -3702]
This rule for the field is not defined in the MDB and with version 1.9.8 I
don´t get that error message.
Best regards, Timm.

Poblem with TSQLTable

Publicado: Dom Jul 12, 2009 3:06 pm
por ignacio
Timm,
In Xailer 1.98 we had this code on AdoRecords.prg:
METHOD FieldPut( n, v ) CLASS XAdoRecords
WITH OBJECT ::oAdo
TRY
IF !( :Bof .OR. :Eof )
DO CASE
CASE v == Nil
v := OLE_NULL
CASE Valtype( v ) = "C" .and. v == ""
v := " " // IOZ: Acces do not like empty strings
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
END CASE
WITH OBJECT :Fields[ n - 1 ]
IF :Type == adLongVarBinary .AND. lAnd( :Attributes, adFldLong )
:AppendChunk( VTArrayWrapper():New( 17, v ) ) // 17 =
VT_UI1 = byte
ELSE
v := :Value := v
ENDIF
END WITH
ENDIF
CATCH
::NewADOError( "ADODB:RecordSet:FielPut( '" + Ltrim( Str( n ) ) +
"' )" )
END
END WITH
RETURN v
As you can see, when the string was empty a single space was added. We did
this because until Xailer 2 we did not retrieve the error correctly and we
made this workaround just because we did not know exactly where was the
problem.
In Xailer 2 the information given by Access is now completely clear and also
in our tests we change the table definition with Access so it accepts empty
strings and remove the workaround code of Xailer 1.98 and everything did
work ok. So I presume you still have some fields that do not accept empty
string. Please check out.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:[email=4a59b6ca@svctag-j7w3v3j....]4a59b6ca@svctag-j7w3v3j....[/email]
> Hi!
>
> I just switched from 1.9.8 to the latest 2.0 beta and have a problem with
> TQLTable.
>
> Adding new records to an MS Access table I get this error:
> [Microsoft][ODBC Microsoft Access Driver] Field 'Artikel.Matchcode' can´t
> be a string with length zero. [# -3702]
>
> This rule for the field is not defined in the MDB and with version 1.9.8 I
> don´t get that error message.
>
> Best regards, Timm.
>
>

Poblem with TSQLTable

Publicado: Dom Jul 12, 2009 3:06 pm
por ignacio
Timm,
In Xailer 1.98 we had this code on AdoRecords.prg:
METHOD FieldPut( n, v ) CLASS XAdoRecords
WITH OBJECT ::oAdo
TRY
IF !( :Bof .OR. :Eof )
DO CASE
CASE v == Nil
v := OLE_NULL
CASE Valtype( v ) = "C" .and. v == ""
v := " " // IOZ: Acces do not like empty strings
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
END CASE
WITH OBJECT :Fields[ n - 1 ]
IF :Type == adLongVarBinary .AND. lAnd( :Attributes, adFldLong )
:AppendChunk( VTArrayWrapper():New( 17, v ) ) // 17 =
VT_UI1 = byte
ELSE
v := :Value := v
ENDIF
END WITH
ENDIF
CATCH
::NewADOError( "ADODB:RecordSet:FielPut( '" + Ltrim( Str( n ) ) +
"' )" )
END
END WITH
RETURN v
As you can see, when the string was empty a single space was added. We did
this because until Xailer 2 we did not retrieve the error correctly and we
made this workaround just because we did not know exactly where was the
problem.
In Xailer 2 the information given by Access is now completely clear and also
in our tests we change the table definition with Access so it accepts empty
strings and remove the workaround code of Xailer 1.98 and everything did
work ok. So I presume you still have some fields that do not accept empty
string. Please check out.
Regards,
--
Ignacio Ortiz de Zúñiga
Xailer support / Soporte de Xailer
http://www.xailer.com
http://www.xailer.info
"Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
news:[email=4a59b6ca@svctag-j7w3v3j....]4a59b6ca@svctag-j7w3v3j....[/email]
> Hi!
>
> I just switched from 1.9.8 to the latest 2.0 beta and have a problem with
> TQLTable.
>
> Adding new records to an MS Access table I get this error:
> [Microsoft][ODBC Microsoft Access Driver] Field 'Artikel.Matchcode' can´t
> be a string with length zero. [# -3702]
>
> This rule for the field is not defined in the MDB and with version 1.9.8 I
> don´t get that error message.
>
> Best regards, Timm.
>
>

Poblem with TSQLTable

Publicado: Lun Jul 13, 2009 10:39 am
por Guest
Ignacio,
yes, there where still some fields that do not accept empty string.
It works now.
Many thanks for your support!
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:4a59dfd4$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Timm,
>
> In Xailer 1.98 we had this code on AdoRecords.prg:
>
> METHOD FieldPut( n, v ) CLASS XAdoRecords
>
> WITH OBJECT ::oAdo
> TRY
> IF !( :Bof .OR. :Eof )
> DO CASE
> CASE v == Nil
> v := OLE_NULL
> CASE Valtype( v ) = "C" .and. v == ""
> v := " " // IOZ: Acces do not like empty strings
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> END CASE
> WITH OBJECT :Fields[ n - 1 ]
> IF :Type == adLongVarBinary .AND. lAnd( :Attributes, adFldLong )
> :AppendChunk( VTArrayWrapper():New( 17, v ) ) // 17 =
> VT_UI1 = byte
> ELSE
> v := :Value := v
> ENDIF
> END WITH
> ENDIF
> CATCH
> ::NewADOError( "ADODB:RecordSet:FielPut( '" + Ltrim( Str( n ) ) +
> "' )" )
> END
> END WITH
>
> RETURN v
>
> As you can see, when the string was empty a single space was added. We did
> this because until Xailer 2 we did not retrieve the error correctly and we
> made this workaround just because we did not know exactly where was the
> problem.
>
> In Xailer 2 the information given by Access is now completely clear and
> also in our tests we change the table definition with Access so it accepts
> empty strings and remove the workaround code of Xailer 1.98 and everything
> did work ok. So I presume you still have some fields that do not accept
> empty string. Please check out.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
> news:[email=4a59b6ca@svctag-j7w3v3j....]4a59b6ca@svctag-j7w3v3j....[/email]
>> Hi!
>>
>> I just switched from 1.9.8 to the latest 2.0 beta and have a problem with
>> TQLTable.
>>
>> Adding new records to an MS Access table I get this error:
>> [Microsoft][ODBC Microsoft Access Driver] Field 'Artikel.Matchcode' can´t
>> be a string with length zero. [# -3702]
>>
>> This rule for the field is not defined in the MDB and with version 1.9.8
>> I don´t get that error message.
>>
>> Best regards, Timm.
>>
>>
>
>

Poblem with TSQLTable

Publicado: Lun Jul 13, 2009 10:39 am
por Guest
Ignacio,
yes, there where still some fields that do not accept empty string.
It works now.
Many thanks for your support!
Best regards, Timm.
"Ignacio Ortiz de Zúñiga" <NoNameToAvoidSpam@xailer.com> schrieb im
Newsbeitrag news:4a59dfd4$[email=1@svctag-j7w3v3j....]1@svctag-j7w3v3j....[/email]
> Timm,
>
> In Xailer 1.98 we had this code on AdoRecords.prg:
>
> METHOD FieldPut( n, v ) CLASS XAdoRecords
>
> WITH OBJECT ::oAdo
> TRY
> IF !( :Bof .OR. :Eof )
> DO CASE
> CASE v == Nil
> v := OLE_NULL
> CASE Valtype( v ) = "C" .and. v == ""
> v := " " // IOZ: Acces do not like empty strings
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> END CASE
> WITH OBJECT :Fields[ n - 1 ]
> IF :Type == adLongVarBinary .AND. lAnd( :Attributes, adFldLong )
> :AppendChunk( VTArrayWrapper():New( 17, v ) ) // 17 =
> VT_UI1 = byte
> ELSE
> v := :Value := v
> ENDIF
> END WITH
> ENDIF
> CATCH
> ::NewADOError( "ADODB:RecordSet:FielPut( '" + Ltrim( Str( n ) ) +
> "' )" )
> END
> END WITH
>
> RETURN v
>
> As you can see, when the string was empty a single space was added. We did
> this because until Xailer 2 we did not retrieve the error correctly and we
> made this workaround just because we did not know exactly where was the
> problem.
>
> In Xailer 2 the information given by Access is now completely clear and
> also in our tests we change the table definition with Access so it accepts
> empty strings and remove the workaround code of Xailer 1.98 and everything
> did work ok. So I presume you still have some fields that do not accept
> empty string. Please check out.
>
> Regards,
>
> --
> Ignacio Ortiz de Zúñiga
> Xailer support / Soporte de Xailer
> http://www.xailer.com
> http://www.xailer.info
> "Timm Sodtalbers" <info@sodtalbers-it.de> escribió en el mensaje
> news:[email=4a59b6ca@svctag-j7w3v3j....]4a59b6ca@svctag-j7w3v3j....[/email]
>> Hi!
>>
>> I just switched from 1.9.8 to the latest 2.0 beta and have a problem with
>> TQLTable.
>>
>> Adding new records to an MS Access table I get this error:
>> [Microsoft][ODBC Microsoft Access Driver] Field 'Artikel.Matchcode' can´t
>> be a string with length zero. [# -3702]
>>
>> This rule for the field is not defined in the MDB and with version 1.9.8
>> I don´t get that error message.
>>
>> Best regards, Timm.
>>
>>
>
>