cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert more than 2 date fields in a table row

Former Member
0 Kudos

Hi,

We have a database table which has many date columns and we want to insert records into this table from xMII. We used [SD] and [ED] params when the number columns in a table is less than or equal to 2. Now we have more date columns in the table. Do you know how we could handle this in xMII?

Note: We would like our xMII code working for both Oracle and SQL Server database.

Thanks,

Sara

Accepted Solutions (0)

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

Since you've run out of the database convenience of SD and ED, then I would recommend using Param.x and just deploy the appropriate Oracle or SQLServer Query Template that includes the specific syntax. As long as your Param.x's line up the same, any client side javascript or html applet PARAMs could remain, but the query template itself would have database specific ' / ' or TO_DATE(' / ','HH....') stuff. If done seamlessly, even BLS links would still work.

Regards,

Jeremy

Former Member
0 Kudos

Jeremy,

Thanks for your quick response.

That means that we need to maintain templates for each database server and implement a switch in the code to select the correct template based on the database server? Don't you think it will be more difficult to maintain this type of code?

Thanks,

Sara

jcgood25
Active Contributor
0 Kudos

No switch, in the few situations where you have this need just deploy the appropriate SQL or Oracle specific query template. I'm assuming that the customer using the Visiprise solution doesn't have both SQL and Oracle connections to this source system (just one or the other). Keep the template named the same so your logic still works.

Regards,

Jeremy

Former Member
0 Kudos

Jeremy,

Some of our customers are using Oracle, some of them are using SQL Server. We want to support any database server. If we write templates for each database server separately, we see the following issues:

1. The code is duplicated in templates. If we need to make some modifications, we need to touch many files.

Former Member
0 Kudos

Jeremy,

Some of our customers are using Oracle, some of them are using SQL Server, some may use different database. We want to support any database server. If we write templates for each database server separately, we see the following issues:

1. The code is duplicated in templates. If we need to make some modifications, we need to touch many files.

2. Maintaining these files over a period of time, will be more difficult.

We will really appreciate if there is another way to handle this issue.

Thanks,

Sara