Re: text datatype support

From: Sue Purkis (suepurkis_at_yahoo.com)
Date: 07/14/04


Date: 14 Jul 2004 10:12:51 -0700

Ty,
  I am looking into this in more detail, but I have a question for
you. Would you be able to set SendStringParametersAsUnicode to false?
 I have included the explanation of that connection property below.

Sue Purkis
DataDirect Technologies

SendStringParametersAsUnicode
SendStringParametersAsUnicode={true | false}. Determines
whether string parameters are sent to the SQL Server database in
Unicode or in the default character encoding of the database.
True means that string parameters are sent to SQL Server in
Unicode. False means that they are sent in the default encoding,
which can improve performance because the server does not need
to convert Unicode characters to the default encoding. You
should, however, use default encoding only if the parameter
string data that you specify is consistent with the default
encoding of the database.
The default is true.

"Ty" <Ty@discussions.microsoft.com> wrote in message news:<4E96E942-4A0D-4E65-BAE6-C3A2BCA45D3A@microsoft.com>...
> I am running SQL 7 on my laptop using an ODBC driver to connect from
java. Getting the datatype text is no problem. However, my ISP uses
SQL 2000 and I have to use a microsoft JDBC driver to access the
database. When running the stored procedure I get incomplete results
due to errors accessing the text field. Is it true you cannot return
text from a stored procedure with this setup? If so, what's the work
around? My work around has been to change all my procedures for the
time being to this "substring(CONTACT_INFO.NOTES,0,3000) as NOTES"
however, truncation occurs.
>
> I also tried changing the code just to get a stream, but it still doesn't work. Any suggestions are welcomed?
>
> public String getBigString( String columnName )
> {
>
> String tempText = "";
>
> try
> {
>
> Reader reader = m_results.getCharacterStream( columnName ); // text data type
>
> if ( m_results.wasNull() )
> {
> tempText = "";
>
> }
> else
> {
>
> BufferedReader bReader = null;
> String inLine;
>
> try
> {
> bReader = new BufferedReader( reader );
>
> while ( ( inLine = bReader.readLine() ) != null )
> {
> tempText += inLine;
>
> }
>
> }
> catch ( IOException e )
> {
> EmailException.sendException( e,
> m_command + " Problem reading column - " +
> columnName + "," + toString() );
>
> }
> finally
> {
>
> try
> {
>
> if ( bReader != null )
> bReader.close();
>
> }
> catch ( IOException e )
> {
> e.printStackTrace();
>
> }
>
> }
>
> }
>
> }
> catch ( SQLException e )
> {
> EmailException.sendException( e,
> m_command + " Problem with column - " + columnName +
> "," + toString() );
>
> return null;
>
> }
>
> return tempText;
>
> }



Relevant Pages

  • Re: Linking tables access - sql server 2005
    ... Another advantage of this method is that you don't need an ODBC setting on the local computer, ... Create a linked table to SQL Server without using a DSN ... Name of the table that you are linking to on the SQL Server database ... Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Did Borland doing well in Q4? Listen to the Earning CC
    ... Extend String RTTI to include encoding information. ... The RTL would be extended to support transcoding of strings as required: ... grinding halt in SQL Server 2008. ...
    (borland.public.delphi.non-technical)
  • Re: Help: Login failed for User ???
    ... You can test database access by creating an empty file with as UDL extension ... The SQL Server will need to be a member server of the domain as will the ... I tried using the new version of the connect string and have the same ... I login Windows, Run application, I can get ...
    (microsoft.public.dotnet.framework.adonet)
  • Error Trap Connection to SQL server
    ... I am trying to establish links from Ms Access to tables in a SQL server ... the database is attached ... Dim rs1 As DAO.Recordset ... Dim strLinkName As String ...
    (microsoft.public.access.security)
  • Help with Error Trapping Connection to SQL server
    ... I am trying to establish links from Ms Access to tables in a SQL server ... the database is attached ... Dim rs1 As DAO.Recordset ... Dim strLinkName As String ...
    (microsoft.public.access.modulesdaovba)