C#ÖÐʹÓÃDataTableÏÔʾAccessÊý¾Ý¿âÖÐÎļþÁбí
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.comboBox2.Items.Clear();
switch(this.comboBox1.SelectedIndex)
{
case 0:
try
{
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=C:\tmpAccess\DataBase1.mdb");
conn.Open();
if(conn.State == System.Data.ConnectionState.Open){
Console.WriteLine("Success");
}
DataTable test = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] { null, null, null, "Table" });
this.dataGridView1.DataSource =test;
int tableIndex = test.Columns.IndexOf("TABLE_NAME");
foreach (DataRow row in test.Rows)
comboBox2.Items.Add(row[tableIndex].ToString());
&nb
Ïà¹ØÎĵµ£º
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......
protected void BindData1()
{
OracleConnection orcn = new OracleConnection("User ID=wesoftwcp; Password=wesoft; Data Source=oradb");
orcn.Open();
&nb ......
C#ÐòÁл¯xml
¹Ø¼ü²½Ö裺
XmlSerializer xSerializer = new XmlSerializer(typeof(MyObj));
StringWriter sWriter = new StringWriter(CultureInfo.InvariantCulture);
XmlTextWriter xTextWriter = new XmlTextWriter(sWriter);
......
Ôõôͨ¹ýODBCʹÓÃwxWidgetsÁ¬½ÓAccessÊý¾Ý¿â
1¡¢wxWidgets¿âÖÐODBCµÄ±àÒë
ĬÈϱàÒëʱ£¬ODBC¿âÖеÄûÓе¼³ö£¬ÖÂʹµ÷ÓÃwxDbConnectInf£¬wxDbTableµÈÀຯÊýÊÇʱ³öÏÖÁ´½Ó´íÎóµÄÎÊÌ⣬¹ÊÊ×ÏÈÒª±àÒëODBC¿âΪµ¼³ö Àà¿â£¬ÕâÐèÒªÔÚ"Include"Ŀ¼ÏµÄ"Setup.h"ÖжÔ#define wxUSE_ODBC 0ÉèÖÃΪ1£¬ÖØÐ±àÒë¼´¿É.
2¡¢Êý¾Ý¿âµÄÁ´½ÓÓ ......
MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
--Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......