10 dim sql$*500
20 execute 'CONFIG database conn connectstring="DRIVER=SQL Server Native Client 11.0;Server=DAL01-SQL-T01;Database=ContributionAccounting;Trusted_Connection=yes;"'
30 sql$="insert into [ContributionAccounting].[dbo].[test] ([a],[b]) values (@x,@y)"
40 open #Sqlconnection:=1: 'database=conn',sql sql$,outin
50 for index_=1 to 100
60 write #sqlconnection, using 'form C 1,L': 'a', 100000
70 next index_
80 close #sqlconnection:
Using SYSERR$ should help to return the last actual SQL error.
You might need to enable logging in BR since sometimes you get multiple errors.
This is the connection string that I use:
CONFIG database SQL-Query connectstring="DRIVER=SQL Server;Initial Catalog=vExchange;Persist Security Info=True;MultipleActiveResultSets=True; Database=MyDBNAME;SERVER=MyServer;Login Name=MyLogin;Password=BR_PASSWORD"
I noticed that you don't have any login information in your connection string.
Using your connection string I came up with this suggestion:
Hi, Luis. Thanks for your reply. I'm certain the connection string is not the problem. Using "Trusted_Connection=yes" in the connection string takes care of logging in. Doing so works for "SQL Server NAtive Client 11.0" driver, not for "SQL Server" dirver. The error I get in the example I provided in the post has to do with binding values to parameters, not with connecting (BR error 3011 - SQL bind parameter failure, SYSERR$ - Invalid precision value)
Here is an expanded example below that illustrates better what I'm trying to accomplish: