This Extension database type (SqlServer) is not compatible with the current Plat

This Extension database type (SqlServer) is not compatible with the current Plat

  
Hi guys,

I am trying to use tables from an existining SQL Server 2005 database on Integration Studio 5.1, but i get the following error:

"This Extension database type (SqlServer) is not compatible with the current Platform Database type (Oracle)."

My Platform Database is Oracle 10g R2 and i have created a database connection to the specific SQL Server successfully. What is going wrong? I cannot create database extensions for SQL server database if my Platform server is oracle?


Thanks

Matheos
Hi Matheos,

Yes you can.
In Integration Studio, on the main extension tab where it says "DBMS" select "(Both)".


Regards,
João Rosado
Hi João

thanks for response


When i select (Both) and try to verify, i get this warring 'InternationalFreepones."dbo"."FreephoneStatus"' is an invalid table name in Oracle. But the Extension is successfully compiled. Is there any wrong with that?

Then i puplished the extension and tried to use it. After i published my espace and try to run it, i got hte following error (when i try to save a form)


Unable to cast object of type 'System.Data.SqlClient.SqlParameter' to type 'System.Data.OracleClient.OracleParameter'.

What is the problem?

Thanks in advance

Matheos
Hi Matheos,

The warning disappears if you remove the 'InternationalFreepones."dbo". part.
It will continue to work correctly since I assume you already choose the Catalog "InternationalFreepones" correctly when the Database connection was configured in Service Center.

As for the error, it might be a platform problem. So I sugest you to contact OutSystems Tecnical Support.


Regards,
João Rosado
Hi João (and all the other guys of course),

I am working together with Matheos, and we have managed to isolate the source of the error. It only occurs when we are trying to save DateTime SQL Server Values.
The Field Data Type in SQL Server is DateTime. We have tried to set the DataType in Integration Studio both to DateTime And Date, but the problem still occurs. Problem does not occur when No value is set (Null Value). Date Format is
11-10-2011 12:25:00 (DD-MM-YYYY HH:MM:%S).

Any suggestions?

Thanks in advance

Marios
Hi,
Sometimes Oracle 'don't like' date types of SQL, if your problem is passing from SQL to oracle pelase pass the date as text and use the to_date() oracle function.

Please let me know if this help.

Regards
Carlos Rocha
Hi Marios,

Like i said on my first reply the error is probably a Platform problem ..and not something you did wrong.
So I sugest you to contact OutSystems Tecnical Support for proper troubleshooting.

Or at least post the stacktrace of the error.

Regards,
João Rosado
SOLVED:
Hi João, Carlos, and all the other guys.
The problem was that Outsystems Date Format was not recognised by SQL Server (due to the fact that Platform Server is an Oracle 10g R2 I believe)

The Solution:
In Integration Studio I changed the DataType of the Field from DateTime to Text.
In Service Studio:
I Created a User Function which converts the Date from OutSystems Format to SQL Server Format ("YYYY/MM/DD HH:MM:SS") .
Input Parameter:
InputDateText 
OutputDateText

Variable:
TemporaryDateTime


Step 1. Convert Text to DateTime By Using Function
TemporaryDateTime = TextToDateTime(InputDateText)
Step 2: Convert DateTime to Text By Using Function
OutputDateText = FormatFullDateTime(TemporaryDate, "/", ":")



Thanks again for all your helpful advice.


Best Regards,

Marios