Opentext - Content Server - Update SQL Table from Form - content-management-system

What is the procedure to update a table on the SQL Database from a Content Server Form?

You need to define a Form Template object, then manage its relationable table (using its context menu) and create or link an SQL table.
Then you create a form for that template, pick the wanted submission mechanism and you are done. Using that form you have CRUD capability on that SQL table.

Related

EF Core - create database programmatically

What's the best approach to create a database in EF core programmatically and then run the migrations to make sure the new database has all database objects?
We're building a SaaS based application where subscribers can signup on the website themselves and when they signup providing correct payment details, the application needs to create a new database (in SQL Azure) for the subscriber automatically and execute all migrations on the new database.
I have looked at this question here:
auto create database in Entity Framework Core
It does not give details on the following:
1) how to specify the name of the new database
2) create a new database login
3) add that new database login to the database as a user with dbo permissions
Create an Azure SQL Database Basic tier (for example, it cost $5 a month, you can also create a free one available for a year) with all the objects needed on the database, which you can copy asynchronously with a statement like below or using PowerShell.
CREATE DATABASE db_copy
AS COPY OF ozabzw7545.db_original ( SERVICE_OBJECTIVE = 'P2' );
You can then monitor when the copy finishes with below statement:
Select
[sys].[databases].[name],
[sys].[databases].[state_desc],
[sys].[dm_database_copies].[start_date],
[sys].[dm_database_copies].[modify_date],
[sys].[dm_database_copies].[percent_complete],
[sys].[dm_database_copies].[error_code],
[sys].[dm_database_copies].[error_desc],
[sys].[dm_database_copies].[error_severity],
[sys].[dm_database_copies].[error_state]
From
[sys].[databases]
Left
Outer
Join
[sys].[dm_database_copies]
On
[sys].[databases].[database_id] = [sys].[dm_database_copies].[database_id]
Where
[sys].[databases].[name] = 'db_copy'

MS Access Filter Child Table by Record Chose on Form

I'm trying to create a simple 2 table database - table 1 holds ClientInfo and table 2 has ClientVisits - Relationship is on ClientInfo.ID->ClientVisits.ClientID. Then I have a form created thus for viewing the ClientInfo plus a child(sub?)table which SHOULD show all the records from ClientVisits where my Form ClientID = ClientVisits.ClientID.
Here is my form
Here is the child table with fields shown
Relationships
So I already have one record in ClientVisits for the currently chosen ClientID form record. But it doesn't show in my Table.ClientVisits. Other than the relationship I don't have any other link between the ClientID and the ClientVisits.ClientID field.
If I need to post further info please let me know, trying to describe this as well as I can - sorry if it's not making sense. Thanks.
You have to link both tables in your form.
In my example, main data of my form is a table called CLIENTES, where it shows all the information about a cliente. It would be exactly the same as your table ClientDetails. In this table, primary key is a field called DNI (it would be the equivalent of your ID field)
I got a second table called CONSULTAS MÉDICAS. This table is just a list of how many times this client comes to see us. It would be the same as your secondary table CLIENT VISITS. In this table, I got a field called PACIENTE, linked to my table CLIENTES. Let me show you.
Ok, now my form is done based on the data of my table CLIENTES, but I got a subform control, where I have linked the table CONSULTAS MÉDICAS
To make this work is pretty easy. Not filters or queries. Just linked child and master fields. To do this, you have to select properties of your subform control, and then go to DATA TAB
Just choose as main field your ID field from table CLIENT DETAILS and link it to child field CLIENT ID from table CLIENT VISITS
That should work for you.

Why is the master data service from SQL Server 2016 creating a text field as the primary ID?

If I create a new entity from excel, or from the UI and select "Generate code automatically" for the Code attribute, MDS creates an attribute of the type "Free-form - Data Type : Text, Length : 250" !? Why not "Number, Decimals: 0"?
MDS does not give you control over the attribute types for the two default fields 'Name' and 'Code' on any entity. That is unfortunately how it was designed.
In the back-end, MDS actually uses integers as the primary keys for the entities it generates. You can look at how this is done by creating a subscription view in the web-app, and then logging onto the database with SSMS and scripting the view you created. You will see a few more attributes created and used.

Sails framework Need to fetch data from available table in database

I am using sails framework to fetch data from a table and show it to the user, after some manupulations. The table belongs to another application, I just need to read the data from it.
I created a Model same as its available in the database along with the column names. I get an error as
RequestError: There is already an object named 'table_Name' in the database.
I cannot create table, is there a way around in sails

Entity Framework: How can I assign permissions on new code first tables?

I think the question speaks for itself. I have a fairly typical case where I've created a new entity class on which I've specified the [Table] attribute. The Add-Migration command has generated the corresponding DbMigration.CreateTable, etc.
However, I would like to ensure that the table is create in SQL Server with the select permission assigned to group... let's call it ABCGRP.
Can this be done via attributes, the Fluent API or will I need to simply create a SQL script with a GRANT operation?