C# 创建Access数据库表
using System;
using System.IO;
using System.Windows.Forms;
using Access = Microsoft.Office.Interop.Access;
// 添加引用->.NET-> dao,Microsoft.Office.Interop.Access
namespace WinFormAccess
{
public partial class FormAccess : Form
{
public FormAccess()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
try
{
string dbPath = Path.Combine(Application.StartupPath, "Images.mdb");
if (File.Exists(dbPath))
File.Delete(dbPath);
Access.Application newAccess = new Access.Application();
newAccess.NewCurrentDatabase(dbPath);
dao.Database db = newAccess.CurrentDb();
//db.Execute("create table [Images] (Name String primary key, Bytes LongBinary)", Type.Missing);
db
相关文档:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Office.Inter ......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="Default" value="Default" />
</appSettings>
<connectionStrings>
<add name="Default" connectionString="Data Source=192.168.1.197;User ID ......
今天在VS2005调试一个C# C/S程序,当通过RFC与SAP连接时间过长时,出现此错误,在网上找到解决办法。
VS2008上的一个程序,通过Oracle.DataAccess.dll执行drop user
cascade操作,我在sqlplus执行此操作大约需要一分钟左右时间,当我在VS2008中debug启动此程序时,一直接收到
“ContextSwitchDeadlock is detected& ......
using System;
using System.Collections;
using System.Configuration;
using System.Data;
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.Data.SqlClient; ......