Jump to content

object database connection


Tn_Pink

Recommended Posts

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 by Tn_Pink
Link to comment

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 by Tn_Pink
Link to comment
  • 2 weeks later...
  • Vectorworks, Inc Employee

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?

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...