Tn_Pink Posted September 16, 2014 Share Posted September 16, 2014 (edited) I'm newbie with this programming language. I would like to ask how I can set the object database connection using vectorscript. my external database is MS access. I can set it manually but i don't know how it will be done through script. Can anyone help me? Thanks in advance. Edited September 16, 2014 by Tn_Pink Quote Link to comment
Administrator JuanP Posted September 16, 2014 Administrator Share Posted September 16, 2014 Try this kbase article, it might help. http://kbase.vectorworks.net/questions/1218/ODBC+Support+Information Quote Link to comment
Tn_Pink Posted September 17, 2014 Author Share Posted September 17, 2014 (edited) Thanks Juan P. But I already checked that article. What I don't know are: Using vectorscript, 1) How can I connect the specific database table in manage databases dialog? User:=''; Pass:=''; ConnectionResult:=DBDocAddConn('AccessName01',User,Pass); ConnectionResult:=DBSetFormatConn('RecordName01','DBName01','TableName01'); ConnectionResult:=DBDocSetColKey('DBName01','TableName01','ColumnName01',TRUE); * But still not connected 2) How can I connect the DB Table Column to the record field name? User:=''; Pass:=''; ConnectionResult:=DBDocAddConn(AccessName01,User,Pass); ConnectionResults:=DBSetFormatConn(RecordName01,DBName01,TableName01); ConnectionResult:=DBDocSetColKey(DBName01,TableName01,ColumnName01,TRUE); ConnectionResult:=DBSetFormatFieldConn(TableName01,FieldName01,linkType01,3); * But still not connected Edited September 17, 2014 by Tn_Pink Quote Link to comment
Vectorworks, Inc Employee Alexandra Beshevlieva Posted September 25, 2014 Vectorworks, Inc Employee Share Posted September 25, 2014 Hi there! Check this article. There is a sample script. You wrote: 1) How can I connect the specific database table in manage databases dialog? User:=''; Pass:=''; ConnectionResult:=DBDocAddConn('AccessName01',User,Pass); ConnectionResult:=DBSetFormatConn('RecordName01','DBName01','TableName01'); ConnectionResult:=DBDocSetColKey('DBName01','TableName01','ColumnName01',TRUE); * But still not connected How do you check the connection at this point? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.