Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

"USING CLIENT FILE" not supported in sqlanywhere #48

Open

Description

Hi,

I am trying upload client file in Sybase IQ, internally the procedure uses "USING CLIENT FILE" for directly loading file from client machine to database. but sqlanywhere is failing due to file permissions issue.

  1. Is this feature supported by sqlanywhere nodejs dependecy like java sajdbc.jar dependency ?
  2. If yes, could you please help me to configure nodejs sqlanywhere db connection with appropriate file permission?

Error
[Error: Code: -500001 Msg: RAISERROR executed: Error - Unable to load #temp_stats table & sql error code = -6 & Error Message = Operation failed on file due to file permissions. File: /mnt/d/workspaceNodeJS/fileuploadTest2/data/file.csv
-- (oslib/hos_clientfileio.cxx]

in java same thing is possible using callback

  1. sajdbc.jar & supporting DLL or *.so files

class T_filetrans_callback implements sap.jdbc4.sqlanywhere.SAValidateFileTransferCallback
{
T_filetrans_callback()
{
}

public int callback(String filename, int is_write)
{
 System.out.println( "File transfer granted for file " + filename + 
 " with an is_write value of " + is_write ); 
 return( 1 ); // 0 to disallow, non-zero to allow
}

}

// create and register validate file transfer callback
con = connect();
T_filetrans_callback filetran_worker = new T_filetrans_callback();
((sap.jdbc4.sqlanywhere.IConnection)con).setSAValidateFileTransferCallback( filetran_worker );

Java callback details : https://130.214.205.8/index.html#sqla170/en/html/3bd590f46c5f1014a6ebdf8646d9a523.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /