How Can I Disable/enable Bartenders Connected Database Using Vbscript 关注
i need to temporarily disable and then reenable the database that is connected to a label format.
the database will be either excel, csv, text
i only need help in disabling/re-enabling the database, the vbscript to manipulate the data is not a problem for me.
i need to do this so that i can manipulate the database with VBScript probably in the postprint event, for example user will select the record as normal during prompting, user may alter some of the data in the prompts linked to the database fields, then when the postprint is activated the vbscript will disable/close the linked database connection, open the external database using vbscript (same database as the linked database), write the updated data back, close the vb connected database, then re-enable the linked database connection
i am thinking that it may be possible to do this via bartenders objects, such as Application or Format, but i can't find anything about the database object i.e. its object name, if it has one and if it has been published to allow access
any help appreciated
2 评论

Ian Cummings
版主It is not possible to disable the database connection via VB script inside a BarTender document. Perhaps the below example might help point the way...
thanks Ian, this looks like what I was after
I have had a play with it this morning and with a few mods and adding a prompt for the product and a little change to the SQL I am able to update the product data with the value entered into the prompt.
this shows me that I can update the record via the prompt screen
I still need to add a new record, if the product name is not already one in the database, but but I think this should be possible and you have pointed me in the right direction
thanks again
请先登录再写评论。