Lotusscript to insert a Subform into a Form programmatically - lotus-domino

I am trying to deploy a Domino application in a possibly friendly way. I've got to the point where an agent imports Domino elements.
The functionality I'd like to provide is in a subform which I could export and import.
I still need to insert the SubForm in a specific location in an already existing Domino application.
I didn't find any API that could be helpful. Is there a way to access and modify the code of an already existing form directly?

DXL round-tripping of forms isn't perfect, so I wouldn't recommend using it in the way adminfd describes. You can, however, write C/C++ code that uses the Notes C API functions to scan through the CD records of a form and insert a subform reference. CD records are complex and you would probably want an expert to assist, to make sure you don't screw up your form by inserting your stuff in the wrong spot.

Related

Create connection to SQL from VB.net application

I'm looking in to learning some coding and have a small project in mind to begin with,
To begin if anyone could point me in the direction of some good VB.net resources I would be very appreciative,
On a more specific note, I have a few particular questions:
I have a form with several text boxes, how would I go about using this form to establish a connection to an SQL database whereby the boxes on the form are used for (1, servername\instance. 2, database name. 3, sql login. 4,sql password) triggered by pressing the 'connect' button
I also have a form with a single text box, I would like to be able to query a specific table for records where based on primary key = contents of text box. On the form, I'd like to have other text boxes which link to columns on the table and return the value of the associated record.
As a development of the above, I would like to then have a button that writes any changes to the information back on to the record in SQL.
If anyone is able to offer any advise or insight on how I would begin going about this, that would be great.
I would much rather sources of how to learn to do the above that code if possible.
Do several thing or post actual code where you are stuck. it sounds like you will ask about how to put values on Database also. honestly want to say, if you research little bit what you want you will definitely get it. first google and then ask.
because you are in learning phase try to gather as much as knowledge rather copy paste code.
HINTS:
1) set your web.config with connection to sql
see: MSDN document
https://msdn.microsoft.com/en-us/library/ff400235.aspx
2) Then start coding UI
3) on UI you have different boxes, on each button click you should handle separately
search on:
How to open SQL Connection on button click
How to insert new records into a database
and lastly if you came across error then post your issue here.
Good Luck

How do I upload an Excel sheet to a SQL table in a Lightswitch web client?

I have a lightswitch project in visual studio 2013, using vb.net. I would like the user to be able to click a button and have lightswitch find an excel file, and upload that file to a sql table according to a pre-determined column mapping.
My preference was to use the Office Integration extension for visual studio, which I got working with VS 2013 by downloading it from this link: http://www.ge.tt/71iuRQv/v/0
However, the documentation and examples for office integration seem to be very heavy on getting an excel spreadsheet into a display in the lightswitch web client, rather than into the sql data table, which is where I need it. Here are the examples I've been following:
http://blogs.msdn.com/b/bethmassi/archive/2012/07/18/new-and-improved-office-integration-pack-extension-for-lightswitch.aspx
Alternatively, I have an existing stored procedure, and I can request that the server call this stored proc by sending a web API extension from the client to the server. I have this working already for other stored procs, according to examples from Beth Masi and Paul van Bladel. (Stackoverflow won't let me post the links...)
The undesirable part of this approach is that the stored proc is old, and messy.
I've searched and searched, but have yet to find anyone approach this problem for VS 2013 with lightswitch. Any useful advice?
I've used the method detailed by Matt Sampson to store word files and it works very well. Since it just stores the raw binary it should handle Excel files just as well.
If you're creating the table in LightSwitch, use the Binary Type. If you use SQL create scripts use varbinary(MAX).
You need to create a custom Silverlight dialog box to gain access to the OpenFileDialog object. Then open the file in as a FileStream.
Finally, you need to add a handler for the closed method of the control and then show the control to the user. Most likely done in a button. This needs to be done on the main dispatcher.
The code examples are in C# but I just used one of the many available translators out on the web and copy/pasted the VB.NET code.
Another option might be to consider shelling out to the DTSEXEC run-time to execute an SSIS package to perform the upload - especially if the target Excel spreadsheets have predefined layouts and content data types.
Even simpler, you might be able to use the SQL Server BULK INSERT command to get the job done - although that would require a SQL Client connection to your database.
HTH

Create a log for all SQL action in Access

I'm currently having a problem at work.
Someone in the is modifying the table directly.
For example in my database I have school names like ETS. Well, today it was named Polytechnique.
What I'm trying to tell who did this modification either by his/her IP address or any other way. I currently have no ideas on how to proceed.
What I would like is just the beginning of a solution as to let me figure a part of it . I sadly don't have any ideas for the moment.
Thank you (I'm sorry for any errors english is not my first language. Also I could be mistaken for the tags)
(Welcome to SO. Sorry no one answered your question yet. It almost never takes this long.)
The short answer is: No. There is no way to find out who was modifying your tables directly. Access does not have any kind of automatic change logging, and you cannot create any logging procedures in VBA that will monitor manual changes to the tables.
One of the requirements for Access as a front-end is that you trust your end-users to not open tables and edit the data directly.
To prevent this in the future, here are some options:
Right click on your table to hide it. However, the user can just unhide it if they know it is there.
In your Access db is an option called "Display Navigation Option". Disabling this will hide the side-bar so the user can't see the tables. However, pressing F11 will still display them again. This can be easily googled, so I don't recommend it if your users are motivated.
Store your data in a SQL server and use connection strings (not direct links) to retrieve and store information.
Distribute your Access db via Sharepoint. The user will only be able to access the forms you specify and will have no direct access to the tables.
Consider another software package for your problems.

Puttting together binding navigators in a project

I am working on a group project in vb.net, in which all my team members are working on individual tables of a database. All of us are using binding navigator,where the GUI is created by drag and drop from the table.
Is it possible to attach all these pieces together with imports or references?
Will the changes made to the database while working on the program like table adapter can create problem? Do I need to make all those changes in database before importing ?
Can you please give suggestions to put the project together.
By binding the particular combo box to the original table the data need not be re-entered in that particular combo box.It appears at run time. I think my question was not clear that is why I did not get any answer

How to communicate ms word and ms access in vb.net?

I want to create a program that could generate reports from an ms access database and place it on ms word, how can I do that. Please help, I dont have any idea on how to do this.
If you're doing this from vb.net, it seems to me that it would be simpler to automate Word, which has no difficulty utilizing Jet/ACE data as data source. I don't see any reason to involve the Access application in this, unless you have complex logic that needs to be executed within Access to get correct results in Word. For instance, Word doesn't do parent/child data display very well, but Access reports do that very easily.
Another question is the final disposition of the results. It may be that you don't need Word at all, e.g., if you're using Word for nothing more than generating PDFs. In that case, it might make more sense to create Access reports and output those to PDF (there's an add-in available for for A2007, and in previous versions, you can use the VB automatable PDFCreator, which is free).
In short, my conclusions would be:
if you're just merging data in Word from a Jet/ACE data store, then automate Word.
if you need to execute complex logic, it's probably better to automate Access and either output Access reports directly, or automate Word from Access.
In neither case, I believe, would you be automating both Word and Access directly from your VB.NET application.
You should connect to the Access Database using a Typed Dataset.
Right-click the project, click Add New Item, select Typed Dataset, and follow the wizard.
To control Word, add a reference to Microsoft.Office.Word and use the Application class.
You can build reports in MS Access that have the Export to Word functionality built into them.
You can invoke the report from your code and then call the export functionality and give it parameters so that it will export to a .doc file that you name. You can then invoke MS Word and open the .doc file up for display.