!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/share/doc/freetds-0.91/userguide/   drwxr-xr-x
Free 13.81 GB of 61.93 GB (22.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     dsnless.htm (5.96 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
DSN-less configuration

DSN-less configuration

In a DSN-less configuration, the odbc.ini file is not consulted for server connection properties. To connect to a servername, your application may refer to a servername entry in freetds.conf, or explicitly specify the servername's hostname (bypassing freetds.conf).

Example 4-1. Sample files for a DSN-less configuration

The odbcinst.ini is quite brief:

	;
	; odbcinst.ini
	;
	[FreeTDS]
	Driver = /usr/local/freetds/lib/libtdsodbc.so
	

The freetds.conf might look something like:

	;
	; freetds.conf
	;
	[JDBC]
	host = jdbc.sybase.com
	port = 4444
	tds version = 5.0
	

Example 4-2. Connecting with a DSN-less configuration

	/*
	 * application call
	 */
	const char servername[] = "JDBC"; [1]
	sprintf(tmp, "DRIVER=FreeTDS[2];SERVERNAME=%s;UID=%s;PWD=%s;DATABASE=%s;",
	servername, username, password, dbname);
	res = SQLDriverConnect(Connection, NULL, (SQLCHAR *) tmp, SQL_NTS,
	(SQLCHAR *) tmp, sizeof(tmp), &len, SQL_DRIVER_NOPROMPT);
	if (!SQL_SUCCEEDED(res)) {
	printf("Unable to open data source (ret=%d)\n", res);
	exit(1);
	}
	
You can even establish a connection without reference to either odbc.ini or freetd.conf.

Example 4-3. Connecting with a DSN-less configuration that does not use freetds.conf

	/*
	 * application call
	 */
	const char servername[] = "jdbc.sybase.com"; [3]
	sprintf(tmp, "DRIVER=FreeTDS[4];SERVER=%s;UID=%s;PWD=%s;DATABASE=%s;TDS_Version=5.0;Port=4444;",
	servername, username, password, dbname);
	res = SQLDriverConnect(Connection, NULL, (SQLCHAR *) tmp, SQL_NTS,
	(SQLCHAR *) tmp, sizeof(tmp), &len, SQL_DRIVER_NOPROMPT);
	if (!SQL_SUCCEEDED(res)) {
	printf("Unable to open data source (ret=%d)\n", res);
	exit(1);
	}
	

Notes

[1]

refers to the [JDBC] entry in freetds.conf.

[2]

refers to the [FreeTDS] entry in odbcinst.ini.

[3]

refers to the real server name.

[4]

refers to the [FreeTDS] entry in odbcinst.ini.


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.497 ]--