R
RMCompute
Listed below is a shorted version of the code I have created. In the actual
code, a table is read which contains several table names and is processed in
a loop. When each record is read, the code below is populated with a FROM
TABLE AND a TO TABLE NAME and the next sequential record of the array is
read. For this test code intCnt is set to 1. The problem is, although the
password is placed into the code and the table is successfully created, when
the user enters the application and clicks the table, an error is displayed
that the connection cannot be made and requests a password. When the table
is created manually, I check the Save Password box. In this case, when the
user enters the application and clicks the table, they connect successfully
and do not have to enter a password. Is there a switch which can be set
programatically which would set the Save Password box?
Dim tbl As TableDef, conStr As String, tblNm
ReDim AttachedTD(200) As New TableDef
conStr = "ODBC;DRIVER={sql server};" & _
"SERVER=rusxxlqa.us.ricxx.ds,10012;" & _
"DATABASE=SAM;" & _
"UID=Test;" & _
"PWD=Test;" & _
"APP=Microsoft Office 2003;" & _
"WSID=A64X2"
intCnt = 1
AttachedTD(intCnt).Connect = conStr
AttachedTD(intCnt).SourceTableName = “TestFromTableâ€
AttachedTD(intCnt).NAME = “TestToTableâ€
db.TableDefs.Append AttachedTD(intCnt)
db.TableDefs.Refresh
code, a table is read which contains several table names and is processed in
a loop. When each record is read, the code below is populated with a FROM
TABLE AND a TO TABLE NAME and the next sequential record of the array is
read. For this test code intCnt is set to 1. The problem is, although the
password is placed into the code and the table is successfully created, when
the user enters the application and clicks the table, an error is displayed
that the connection cannot be made and requests a password. When the table
is created manually, I check the Save Password box. In this case, when the
user enters the application and clicks the table, they connect successfully
and do not have to enter a password. Is there a switch which can be set
programatically which would set the Save Password box?
Dim tbl As TableDef, conStr As String, tblNm
ReDim AttachedTD(200) As New TableDef
conStr = "ODBC;DRIVER={sql server};" & _
"SERVER=rusxxlqa.us.ricxx.ds,10012;" & _
"DATABASE=SAM;" & _
"UID=Test;" & _
"PWD=Test;" & _
"APP=Microsoft Office 2003;" & _
"WSID=A64X2"
intCnt = 1
AttachedTD(intCnt).Connect = conStr
AttachedTD(intCnt).SourceTableName = “TestFromTableâ€
AttachedTD(intCnt).NAME = “TestToTableâ€
db.TableDefs.Append AttachedTD(intCnt)
db.TableDefs.Refresh