-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDataMgrEngine_cf8.cfc
More file actions
54 lines (42 loc) · 913 Bytes
/
DataMgrEngine_cf8.cfc
File metadata and controls
54 lines (42 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<cfcomponent>
<cffunction name="getDataBase" access="public" returntype="string" output="false" hint="I return the database platform being used.">
<cfscript>
var sDBInfo = 0;
var db = "";
var type = "";
</cfscript>
<cfif Len(variables.datasource)>
<cfdbinfo datasource="#variables.datasource#" name="sDBInfo" type="Version" />
<cfscript>
db = sDBInfo.DATABASE_PRODUCTNAME;
switch(db) {
case "Microsoft SQL Server":
type = "MSSQL";
break;
case "MySQL":
type = "MYSQL";
break;
case "PostgreSQL":
type = "PostGreSQL";
break;
case "Oracle":
type = "Oracle";
break;
case "MS Jet":
type = "Access";
break;
case "Apache Derby":
type = "Derby";
break;
default:
type = "unknown";
type = db;
break;
}
</cfscript>
<cfelse>
<cfset type="Sim">
</cfif>
<cfreturn type>
</cffunction>
</cfcomponent>