This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using DBBulkImport API with current JobServer user.

I'm looking to use this Object API for the bulk import of thousands of 1IM object - however the SDK documentation only details a single initializer

Public Sub New ( _
	tableName As String, _
	connectionString As String, _
	dbFactory As IDbFactory, _
	authString As String _
)

Does anyone know of a way that this API can be used with the current Connection / User as would be available on the Job Server ?

I want to avoid having to provide the username / password in the authstring parameter - rather utilizing the existing connection.

Thanks
Parents
  • Hi hleigh,

    you're right. VID_BuildAuthString is not able to build an AuthString in case of system user authentication. Mostly because Connection.User.Uid is Nothing in this case, but also because the string would require a Password.

    If you really have to use system user authentication, you probably need to build your own AuthString using the following syntax:

    Module=DialogUser;User=<user>;Password=<password>

    I guess the password is required because DbBulkImport's initialiser does an extra Connection.Authenticate() call to re-authenticate the connection.

    Hth,

     Oliver

Reply
  • Hi hleigh,

    you're right. VID_BuildAuthString is not able to build an AuthString in case of system user authentication. Mostly because Connection.User.Uid is Nothing in this case, but also because the string would require a Password.

    If you really have to use system user authentication, you probably need to build your own AuthString using the following syntax:

    Module=DialogUser;User=<user>;Password=<password>

    I guess the password is required because DbBulkImport's initialiser does an extra Connection.Authenticate() call to re-authenticate the connection.

    Hth,

     Oliver

Children
No Data