{"id":281,"date":"2011-12-04T18:56:02","date_gmt":"2011-12-04T18:56:02","guid":{"rendered":"http:\/\/www.kodcafe.com\/?p=281"},"modified":"2011-12-04T18:56:02","modified_gmt":"2011-12-04T18:56:02","slug":"c-access-2007-baglantisi","status":"publish","type":"post","link":"http:\/\/www.kodcafe.com\/?p=281","title":{"rendered":"C # Access 2007 ba\u011flantisi"},"content":{"rendered":"<p>C sharp ta access ile ba\u011flant\u0131 nas\u0131l yap\u0131l\u0131r bu konu hakk\u0131nda biraz u\u011fra\u015fay\u0131m dedim.. Ole db de hata verdi.. daha sonra internette bu hatay\u0131 ara\u015ft\u0131rd\u0131m.. build derlemede kendi bilgisayar\u0131m 64 bitlik oldu\u011fu i\u00e7in debug ayarlar\u0131ndan 32 bit lik (x86) g\u00f6re derlemesini istedim ve hatas\u0131z bir \u015fekilde ba\u011flanti sa\u011flandi&#8230;<br \/>\n<!--more--><\/p>\n<pre>\nusing System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\nusing System.Data.OleDb;\n\nnamespace Access_ba\u011flantisi\n{\n    public partial class Form1 : Form\n    {\n        public Form1()\n        {\n            InitializeComponent();\n        }\n\n        private void button1_Click(object sender, EventArgs e)\n        {\n            OleDbConnection baglanti = new OleDbConnection(@\"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\\ada.accdb\");\n\n            try\n            {\n                baglanti.Open();\n                MessageBox.Show(\"ba\u011flanti tamam\");\n                label2.Text = \"Ba\u011flandi\";\n            }\n            catch (Exception ex)\n            {\n                label2.Text = \"ba\u011flanamadi\";\n                MessageBox.Show(ex.Message.ToString());\n            }\n\n        }\n    }\n}<\/pre>\n<p><a href=\"http:\/\/www.kodcafe.com\/wp-content\/uploads\/2011\/12\/access-ba\u011flantisi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-285\" title=\"access ba\u011flantisi\" src=\"http:\/\/www.kodcafe.com\/wp-content\/uploads\/2011\/12\/access-ba\u011flantisi.png\" alt=\"\" width=\"313\" height=\"341\" \/><\/a><br \/>\nevet \u015fimdi access deki tablomuzdan veri \u00e7ekerek list box aktaraca\u011f\u0131z&#8230;<\/p>\n<pre>using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\nusing System.Data.OleDb;\n\nnamespace Access_ba\u011flantisi\n{\n    public partial class Form1 : Form\n    {\n        OleDbConnection baglanti = new OleDbConnection(@\"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\\ada.accdb\");\n            OleDbCommand komut = new OleDbCommand();\n\n        public Form1()\n        {\n            InitializeComponent();\n        }\n\n        private void button1_Click(object sender, EventArgs e)\n        {\n\n            \/\/public static string veriyolu3 = @\"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=denem.mdb\";\n\n            try\n            {\n                baglanti.Open();\n                MessageBox.Show(\"ba\u011flanti tamam\");\n                label2.Text = \"Ba\u011flandi\";\n            }\n            catch (Exception ex)\n            {\n                label2.Text = \"ba\u011flanamadi\";\n                MessageBox.Show(ex.Message.ToString());\n            }\n\n        }\n\n        private void button2_Click(object sender, EventArgs e)\n        {\n             baglanti.Open();\n            string sorgu = \"Select * from tablo1\";\n            komut.Connection = baglanti;\n               komut.CommandText = sorgu;\n            OleDbDataReader sqlreader = komut.ExecuteReader();\n\n               while (sqlreader.Read())\n               {\n                   listBox1.Items.Add(\"\u0130sim...:\".sqlreader[\"ad\"].ToString());\n               }\n        }\n    }\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>C sharp ta access ile ba\u011flant\u0131 nas\u0131l yap\u0131l\u0131r bu konu hakk\u0131nda biraz u\u011fra\u015fay\u0131m dedim.. Ole db de hata verdi.. daha sonra internette bu hatay\u0131 ara\u015ft\u0131rd\u0131m.. build derlemede kendi bilgisayar\u0131m 64 bitlik oldu\u011fu i\u00e7in debug ayarlar\u0131ndan 32 bit lik (x86) g\u00f6re derlemesini istedim ve hatas\u0131z bir \u015fekilde ba\u011flanti sa\u011flandi&#8230;<\/p>\n","protected":false},"author":1,"featured_media":98,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-sharp"],"_links":{"self":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts\/281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=281"}],"version-history":[{"count":0,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/wp\/v2\/posts\/281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=281"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kodcafe.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}