做一个可以访问本地的软件。然后在客户端装上SQL,并用SQL连到服务器端的SQL。
在客户端就可访问到服务器端的数据了。
不懂在问。

解决方案 »

  1.   

    我也想知道在.Net下怎麼瀏覽autocad或proegineer格式的文件?關注!!
      

  2.   

    如果用Web做。
    将文件所在文件夹设置成虚路径,
    在数据库中保存这个文件的URL用网页显示文件链接。
    点点击可以下载或者直接打开。我觉得用web做简单。
      

  3.   

    得到文件全名 用 microsoft Web 浏览器Com控件 打开
      

  4.   

    但是我必须用form做的呀!有谁能指点下呀!
      

  5.   

    if you are programming winform, as long as the account under which your app runs has permissions to access  those files, why cannot you just use the file path like cnhgj(戏子) suggested?
      

  6.   

    首先要判断目标机器能不能连接上。
    其次要确保有足够的访问权限。
    最后就可以通过保存的路径(\\机器名\path)来访问文件
      

  7.   

    to cnhgj, saucer and kingecg ,那怎么样才能用一个像在web中一个浏览的控件那样来保存这个路径呢?直接写太麻烦了点吧!
      

  8.   

    本人有一CAD像,不過你要下載一個軟件VoloVEp,然后在系統里引用avviewx.dll,將CAD直接存到數據庫了,不知道對你有沒有用:
    namespace OYAMA.GUI
    { using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.IO; using OYAMA.DB;
    using OYAMA.BizEntity; using System.Data.SqlClient;
    using System.Data; /// <summary>
    /// Summary description for Frm30000115.
    /// </summary>
    public class Frm300006 : System.Windows.Forms.Form
    { private string path = "";
    private M_TZ t = new M_TZ();
    private int intLSH = 0; private System.Windows.Forms.Panel panel1;
    private Eps.Controls.WinControls.ButtonEx button4;
    private AxVOLOVIEWXLib.AxAvViewX Ax;
    private System.Windows.Forms.OpenFileDialog openFileDialog1;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.Label label3;
    private System.Windows.Forms.Label label4;
    private System.Windows.Forms.Label label5;
    private System.Windows.Forms.GroupBox groupBox2;
    private OYAMA.GUI.Navigate navigate1;
    private Eps.Controls.WinControls.ButtonEx BtnDelete;
    private Eps.Controls.WinControls.ButtonEx BtnUpdate;
    private Eps.Controls.WinControls.ButtonEx BtnAdd;
    private System.Windows.Forms.GroupBox groupBox3;
    private Eps.Controls.WinControls.ButtonEx button12;
    private Eps.Controls.WinControls.TextBoxEx txtValue;
    private Eps.Controls.WinControls.TextComboBox cmbWhere;
    private Eps.Controls.WinControls.TextComboBox SelectedValue;
    private System.Windows.Forms.Label label14;
    private Eps.Controls.WinControls.ButtonEx BtnPrint;
    private Eps.Controls.WinControls.ButtonEx button11;
    private System.Windows.Forms.Panel panel2;
    private System.Windows.Forms.GroupBox groupBox1;
    private Eps.Controls.WinControls.ButtonEx buttonEx1;
    private Eps.Controls.WinControls.TextBoxEx textBoxEx4;
    private Eps.Controls.WinControls.TextComboBox textComboBox1;
    private Eps.Controls.WinControls.TextComboBox textComboBox2;
    private System.Windows.Forms.Label label6;
    private Eps.Controls.WinControls.ButtonEx buttonEx2;
    private Eps.Controls.WinControls.ButtonEx buttonEx3;
    private System.Windows.Forms.Panel panel3;
    private System.Windows.Forms.DataGrid dataGrid1;
    private Eps.Controls.WinControls.TextBoxEx txtCpbh;
    private Eps.Controls.WinControls.TextBoxEx txtZtry;
    private System.Windows.Forms.DateTimePicker dtmHzrq;
    private Eps.Controls.WinControls.TextBoxEx txtTzrkry;
    private System.Windows.Forms.DateTimePicker dtmRkrq;
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null; public Frm300006()
    {
    //
    // Required for Windows Form Designer support
    //
    InitializeComponent(); //
    // TODO: Add any constructor code after InitializeComponent call
    //
    } /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Dispose( bool disposing )
    {
    if( disposing )
    {
    if(components != null)
    {
    components.Dispose();
    }
    }
    base.Dispose( disposing );
    }
      

  9.   

    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
    System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Frm300006));
    this.panel1 = new System.Windows.Forms.Panel();
    this.dtmRkrq = new System.Windows.Forms.DateTimePicker();
    this.dtmHzrq = new System.Windows.Forms.DateTimePicker();
    this.txtTzrkry = new Eps.Controls.WinControls.TextBoxEx();
    this.txtZtry = new Eps.Controls.WinControls.TextBoxEx();
    this.txtCpbh = new Eps.Controls.WinControls.TextBoxEx();
    this.label5 = new System.Windows.Forms.Label();
    this.label4 = new System.Windows.Forms.Label();
    this.label3 = new System.Windows.Forms.Label();
    this.label2 = new System.Windows.Forms.Label();
    this.label1 = new System.Windows.Forms.Label();
    this.button4 = new Eps.Controls.WinControls.ButtonEx();
    this.Ax = new AxVOLOVIEWXLib.AxAvViewX();
    this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
    this.groupBox2 = new System.Windows.Forms.GroupBox();
    this.navigate1 = new OYAMA.GUI.Navigate();
    this.BtnDelete = new Eps.Controls.WinControls.ButtonEx();
    this.BtnUpdate = new Eps.Controls.WinControls.ButtonEx();
    this.BtnAdd = new Eps.Controls.WinControls.ButtonEx();
    this.groupBox3 = new System.Windows.Forms.GroupBox();
    this.panel3 = new System.Windows.Forms.Panel();
    this.dataGrid1 = new System.Windows.Forms.DataGrid();
    this.panel2 = new System.Windows.Forms.Panel();
    this.groupBox1 = new System.Windows.Forms.GroupBox();
    this.buttonEx1 = new Eps.Controls.WinControls.ButtonEx();
    this.textBoxEx4 = new Eps.Controls.WinControls.TextBoxEx();
    this.textComboBox1 = new Eps.Controls.WinControls.TextComboBox();
    this.textComboBox2 = new Eps.Controls.WinControls.TextComboBox();
    this.label6 = new System.Windows.Forms.Label();
    this.buttonEx2 = new Eps.Controls.WinControls.ButtonEx();
    this.buttonEx3 = new Eps.Controls.WinControls.ButtonEx();
    this.button12 = new Eps.Controls.WinControls.ButtonEx();
    this.txtValue = new Eps.Controls.WinControls.TextBoxEx();
    this.cmbWhere = new Eps.Controls.WinControls.TextComboBox();
    this.SelectedValue = new Eps.Controls.WinControls.TextComboBox();
    this.label14 = new System.Windows.Forms.Label();
    this.BtnPrint = new Eps.Controls.WinControls.ButtonEx();
    this.button11 = new Eps.Controls.WinControls.ButtonEx();
    this.panel1.SuspendLayout();
    ((System.ComponentModel.ISupportInitialize)(this.Ax)).BeginInit();
    this.groupBox2.SuspendLayout();
    this.groupBox3.SuspendLayout();
    this.panel3.SuspendLayout();
    ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
    this.panel2.SuspendLayout();
    this.groupBox1.SuspendLayout();
    this.SuspendLayout();
    // 
    // panel1
    // 
    this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
     this.dtmRkrq,
     this.dtmHzrq,
     this.txtTzrkry,
     this.txtZtry,
     this.txtCpbh,
     this.label5,
     this.label4,
     this.label3,
     this.label2,
     this.label1,
     this.button4,
     this.Ax});
    this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
    this.panel1.Name = "panel1";
    this.panel1.Size = new System.Drawing.Size(757, 216);
    this.panel1.TabIndex = 0;
    // 
    // dtmRkrq
    // 
    this.dtmRkrq.Location = new System.Drawing.Point(320, 42);
    this.dtmRkrq.Name = "dtmRkrq";
    this.dtmRkrq.Size = new System.Drawing.Size(136, 22);
    this.dtmRkrq.TabIndex = 29;
    // 
    // dtmHzrq
    // 
    this.dtmHzrq.Location = new System.Drawing.Point(320, 8);
    this.dtmHzrq.Name = "dtmHzrq";
    this.dtmHzrq.Size = new System.Drawing.Size(136, 22);
    this.dtmHzrq.TabIndex = 28;
    // 
    // txtTzrkry
    // 
    this.txtTzrkry.FocusedColor = System.Drawing.Color.LightSteelBlue;
    this.txtTzrkry.Location = new System.Drawing.Point(104, 75);
    this.txtTzrkry.Name = "txtTzrkry";
    this.txtTzrkry.Size = new System.Drawing.Size(112, 22);
    this.txtTzrkry.TabIndex = 27;
    // 
    // txtZtry
    // 
    this.txtZtry.FocusedColor = System.Drawing.Color.LightSteelBlue;
    this.txtZtry.Location = new System.Drawing.Point(88, 42);
    this.txtZtry.Name = "txtZtry";
    this.txtZtry.Size = new System.Drawing.Size(128, 22);
    this.txtZtry.TabIndex = 26;
    // 
    // txtCpbh
    // 
    this.txtCpbh.FocusedColor = System.Drawing.Color.LightSteelBlue;
    this.txtCpbh.Location = new System.Drawing.Point(88, 8);
    this.txtCpbh.Name = "txtCpbh";
    this.txtCpbh.Size = new System.Drawing.Size(128, 22);
    this.txtCpbh.TabIndex = 25;
    //
      

  10.   

    this.label5.Location = new System.Drawing.Point(240, 42);
    this.label5.Name = "label5";
    this.label5.Size = new System.Drawing.Size(72, 16);
    this.label5.TabIndex = 24;
    this.label5.Text = "入庫日期:";
    // 
    // label4
    // 
    this.label4.Location = new System.Drawing.Point(16, 80);
    this.label4.Name = "label4";
    this.label4.Size = new System.Drawing.Size(96, 16);
    this.label4.TabIndex = 23;
    this.label4.Text = "圖紙入庫人員:";
    // 
    // label3
    // 
    this.label3.Location = new System.Drawing.Point(240, 16);
    this.label3.Name = "label3";
    this.label3.Size = new System.Drawing.Size(72, 16);
    this.label3.TabIndex = 22;
    this.label3.Text = "繪制日期:";
    // 
    // label2
    // 
    this.label2.Location = new System.Drawing.Point(16, 50);
    this.label2.Name = "label2";
    this.label2.Size = new System.Drawing.Size(72, 16);
    this.label2.TabIndex = 21;
    this.label2.Text = "制圖人員:";
    // 
    // label1
    // 
    this.label1.Location = new System.Drawing.Point(16, 16);
    this.label1.Name = "label1";
    this.label1.Size = new System.Drawing.Size(72, 16);
    this.label1.TabIndex = 20;
    this.label1.Text = "產品編號:";
    // 
    // button4
    // 
    this.button4.Cursor = System.Windows.Forms.Cursors.Hand;
    this.button4.DarkColor = System.Drawing.SystemColors.Control;
    this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
    this.button4.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    this.button4.LightColor = System.Drawing.SystemColors.HighlightText;
    this.button4.Location = new System.Drawing.Point(472, 200);
    this.button4.Name = "button4";
    this.button4.Size = new System.Drawing.Size(75, 16);
    this.button4.TabIndex = 19;
    this.button4.Text = "上傳圖片";
    this.button4.Click += new System.EventHandler(this.button4_Click);
    // 
    // Ax
    // 
    this.Ax.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
    this.Ax.ContainingControl = this;
    this.Ax.Location = new System.Drawing.Point(544, 0);
    this.Ax.Name = "Ax";
    this.Ax.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Ax.OcxState")));
    this.Ax.Size = new System.Drawing.Size(216, 216);
    this.Ax.TabIndex = 0;
    // 
    // groupBox2
    // 
    this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
    this.navigate1,
    this.BtnDelete,
    this.BtnUpdate,
    this.BtnAdd});
    this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top;
    this.groupBox2.Location = new System.Drawing.Point(0, 216);
    this.groupBox2.Name = "groupBox2";
    this.groupBox2.Size = new System.Drawing.Size(757, 40);
    this.groupBox2.TabIndex = 43;
    this.groupBox2.TabStop = false;
    // 
    // navigate1
    // 
    this.navigate1.Location = new System.Drawing.Point(8, 10);
    this.navigate1.Name = "navigate1";
    this.navigate1.Size = new System.Drawing.Size(96, 24);
    this.navigate1.TabIndex = 19;
    // 
    // BtnDelete
    // 
    this.BtnDelete.Cursor = System.Windows.Forms.Cursors.Hand;
    this.BtnDelete.DarkColor = System.Drawing.SystemColors.Control;
    this.BtnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
    this.BtnDelete.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    this.BtnDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    this.BtnDelete.LightColor = System.Drawing.SystemColors.HighlightText;
    this.BtnDelete.Location = new System.Drawing.Point(514, 10);
    this.BtnDelete.Name = "BtnDelete";
    this.BtnDelete.Size = new System.Drawing.Size(75, 24);
    this.BtnDelete.TabIndex = 16;
    this.BtnDelete.Text = "刪除(&D)";
    // 
    // BtnUpdate
    // 
    this.BtnUpdate.Cursor = System.Windows.Forms.Cursors.Hand;
    this.BtnUpdate.DarkColor = System.Drawing.SystemColors.Control;
    this.BtnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
    this.BtnUpdate.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    this.BtnUpdate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    this.BtnUpdate.LightColor = System.Drawing.SystemColors.HighlightText;
    this.BtnUpdate.Location = new System.Drawing.Point(439, 10);
    this.BtnUpdate.Name = "BtnUpdate";
    this.BtnUpdate.Size = new System.Drawing.Size(75, 24);
    this.BtnUpdate.TabIndex = 15;
    this.BtnUpdate.Text = "修改(&U)";
    // 
    // BtnAdd
    // 
    this.BtnAdd.Cursor = System.Windows.Forms.Cursors.Hand;
    this.BtnAdd.DarkColor = System.Drawing.SystemColors.Control;
    this.BtnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
    this.BtnAdd.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
    this.BtnAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    this.BtnAdd.LightColor = System.Drawing.SystemColors.HighlightText;
    this.BtnAdd.Location = new System.Drawing.Point(364, 10);
    this.BtnAdd.Name = "BtnAdd";
    this.BtnAdd.Size = new System.Drawing.Size(75, 24);
    this.BtnAdd.TabIndex = 14;
    this.BtnAdd.Text = "新增(&A)";
    this.BtnAdd.Click += new System.EventHandler(this.BtnAdd_Click);
    // 
    // groupBox3
    // 
    this.groupBox3.Controls.AddRange(new System.Windows.Forms.Control[] {
    this.panel3,
    this.panel2,
    this.button12,
    this.txtValue,
    this.cmbWhere,
    this.SelectedValue,
    this.label14,
    this.BtnPrint,
    this.button11});
    this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
    this.groupBox3.Location = new System.Drawing.Point(0, 216);
    this.groupBox3.Name = "groupBox3";
    this.groupBox3.Size = new System.Drawing.Size(757, 262);
    this.groupBox3.TabIndex = 44;
    this.groupBox3.TabStop = false;
    // 
    // panel3
    // 
    this.panel3.Controls.AddRange(new System.Windows.Forms.Control[] {
     this.dataGrid1});
    this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
    this.panel3.Location = new System.Drawing.Point(3, 83);
    this.panel3.Name = "panel3";
    this.panel3.Size = new System.Drawing.Size(751, 176);
    this.panel3.TabIndex = 23;
    // 
    // dataGrid1
    // 
    this.dataGrid1.CaptionVisible = false;
    this.dataGrid1.DataMember = "";
    this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
    this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
    this.dataGrid1.Name = "dataGrid1";
    this.dataGrid1.ReadOnly = true;
    this.dataGrid1.Size = new System.Drawing.Size(751, 176);
    this.dataGrid1.TabIndex = 0;
    this.dataGrid1.CurrentCellChanged += new System.EventHandler(this.dataGrid1_CurrentCellChanged);
    // 
    // panel2
    // 
    this.panel2.Controls.AddRange(new System.Windows.Forms.Control[] {
     this.groupBox1});
    this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
    this.panel2.Location = new System.Drawing.Point(3, 18);
    this.panel2.Name = "panel2";
    this.panel2.Size = new System.Drawing.Size(751, 62);
    this.panel2.TabIndex = 22;
    //