Skip to content

Connection Problem #23

Description

@AkilGoku

Hi , am facing problem in inserting data to sqlserver from R using the dbBulkcopy function .

url = "Server=a4ms00134;Database=Demog_Model;Trusted_Connection=False;user id=_;password=_;"
conn <- dbConnect('SqlServer',url=url)
these lines doesnt throw any error but when I run the below code
dbBulkCopy(conn, "NEW_BP_TABLE", value = id.file)

i get the following error -
Error in clrCallStatic("rsqlserver.net.misc", "SqlBulkCopy", con.string, :
Type: System.Data.SqlClient.SqlException
Message: Login failed for user '******'.
Method: Void OnError(System.Data.SqlClient.SqlException, Boolean, System.Action1[System.Action]) Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClien

Please help me solve this issue.

Thanks
Akil

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions