turkoglu98 Posted May 10, 2012 Share Posted May 10, 2012 arkadaşlar araştırdım bir kod buldum ama yazdıramıyorum kod bu [quote name='galetis' date='04 January 2012 - 00:02 ' timestamp='1325628156' post='1135477'] Varolan tabloların isimlerini alma; [code]SELECT * FROM dbname.sqlite_master WHERE type='table'; [/code] [/quote] soru şu sqlite3 veritabanında açtığım tabloları nasıl yazdırabilirim --tüm tabloları almaktan listboxa yazdırmaya kadar kod lazım [size="5"][color="#FF0000"]YARDIMCI OLABİLECEK ARKADAŞLARA ŞİMDİDEN TEŞŞEKKÜRLER [/color][/size] Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted May 12, 2012 Share Posted May 12, 2012 Galetisin videolu anlatimini izledinmi? Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 12, 2012 Editor Share Posted May 12, 2012 database adını ve tablo adını söylermisin Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 12, 2012 Author Share Posted May 12, 2012 videoları izledim ama orada anlatmıyor -------------------- database nin adı database.db ben tüm tabloları yazdırmak istiyorum Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 12, 2012 Editor Share Posted May 12, 2012 bu şekilde yaparsın SQLite3Cursor, err = SQLite3Connection:execute("SELECT * FROM database"); oku = SQLite3Cursor:fetch({},"a"); while oku do ListBox.AddItem("ListBox1",oku.sütunadı, ""); oku = SQLite3Cursor:fetch(oku,"a"); end Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 12, 2012 Author Share Posted May 12, 2012 (edited) arkadaşım anlamadın sen beni ben : ---------------------------------- SQLite3Cursor, err = SQLite3Connection:execute("SELECT * FROM database"); ---------------------------------- burada database yazdığın yer tablo olması gerekiyor bende bir .db uzantılı dosya var onun için de bunun gibi 6 tane var ama bu altı tanesini yazdıramıyorum ----------------------------------------------------------------------------------------------------- bir program yapıcam (veresiye programı sakın bana böyle bir çalışma var demeyin) her kişi için ayrı tablo açmam gerekiyor bu tablonun içindede id,borç,açıklama,tarih gibi şeyler olucak böylece karışıklık olmuyacak http://pclad.com/a.bmp Edited May 12, 2012 by turkoglu98 Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 12, 2012 Author Share Posted May 12, 2012 bmp yi kabul etmiyordu Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 12, 2012 Editor Share Posted May 12, 2012 SQLite3Connection, err = SQLite3:connect("database");-- bu komutla database e bağlandık SQLite3Cursor, err = SQLite3Connection:execute("SELECT * FROM tabloadı");--burada ise hangi tablodan değer alacaksak o tablo adını yazıyoruz. oku = SQLite3Cursor:fetch({},"a"); bu kod sana göre işte ama kullanmasını bilirsen. her bir tablo için bunu fonksiyon haline getir. Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 12, 2012 Author Share Posted May 12, 2012 tamam ben bu koduda biliyorum ama ben değer almak istemiyorum ben tüm tabloların ismini almak istiyorum Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 12, 2012 Editor Share Posted May 12, 2012 Dediğini şimdi anladım o verdiğin kodlada nasıl olacak bilmiyorum galetis e sormak lazım. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 13, 2012 Editor Share Posted May 13, 2012 istediğin şeyi araştırdım ve şuna karar verdim Database kısmındaki sqlite3 plugini değilde actions olarak alınan Sqlite plugini daha iyiymiş onu öğrendim. ve istediğin sonucuda buldum. [code] db = SQLite.Open("C:\\deneme.db"); tResult = SQLite.QueryToTable(db, "SELECT * FROM sqlite_master WHERE type='table'") for i, k in pairs(tResult.Data) do Dialog.Message("Result!", tResult.Data[i]["name"]); end[/code] Tablo oluşturmak için : [code]--SQLite.Query(db,"create table foo(a integer primary key, b text, c integer)"); --SQLite.Query(db,"create table bar(a integer primary key, b text, c integer)");[/code] Quote Link to comment Share on other sites More sharing options...
KintaRo Posted May 13, 2012 Share Posted May 13, 2012 her müşteriye ayrı tablo açmak performans kaybından başka birşey değil ve günümüzdeki uygulamaların hiç biri bu şekilde bir yol izlemez. yanlış yoldasınç Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 13, 2012 Author Share Posted May 13, 2012 boş ver zaten yapamassam başka bir programda kullanıcağım Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 13, 2012 Editor Share Posted May 13, 2012 Müşteri çok olursa tabloda o kadar çok olacak desene dediğim plugini kullanırsan daha güzel seçeneğide bol. Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 15, 2012 Author Share Posted May 15, 2012 plugini kullanıcam dediğin gibi daha güzelmiş bu arada pluginin sqlite3 desteği var mı Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 15, 2012 Editor Share Posted May 15, 2012 Valla sqlite3 desteği varmı bilmiyorum ama normal veritabanı felan oluşturduktan sonra navicat veri eklemene izin veriyor muhtemelen sqlite3 dür.Tablo isimlerini alabildinmi. Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 15, 2012 Author Share Posted May 15, 2012 şimdi deneme fırsatı buldum ve şöyle bir hata verdi [img]http://d1205.hizliresim.com/x/h/5xxg5.png[/img] Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 15, 2012 Editor Share Posted May 15, 2012 9.cu satırda Query yaptıgın kodda database adı dogrumu. Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 16, 2012 Author Share Posted May 16, 2012 evetama sorun database nin sqlite3 ile yapılmasından dolayı olabilir Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 18, 2012 Editor Share Posted May 18, 2012 Navicat ile yaptıgın database i sqlite plugini okumuyor malesef o yüzden sqlite programı ile [code]SQLite.Query(db,"create table senintablo(a integer primary key, b text, c integer)");[/code] bu kodu kullanarak tablo içinde kolonlar oluşturabilirsin. Quote Link to comment Share on other sites More sharing options...
turkoglu98 Posted May 19, 2012 Author Share Posted May 19, 2012 tüh neyse bende senin verdiğin kodla yaparım Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.