Search the web
Sign In
New User? Sign Up
MapinfoTurkiye · Türkçe MapInfo Kullanýcý Yardim Sitesi
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: [MapinfoTurkiye] Mapxtreme Desktop Uygulamasında Nesne Silme   Message List  
Reply | Forward Message #7261 of 7415 |
Re: Mapxtreme Desktop Uygulamas�±nda Nesne Silme

merhabalar,

mustafa bey öncelikle ilginiz ve cevabýnýz için teþekkür ederim. fakat malesef
ayný sorun devam ediyor.

--- In MapinfoTurkiye@yahoogroups.com, Mustafa �Z�ETIN
<mustafaozcetin76@...> wrote:
>
> Ben silme isleminde asagidaki gibi bir kod kullandim ve boyle bir problem
yasamadim:
>
>
> public static void deleteFeature(string table, string miKey) {
>     try {
>         using (MIConnection miconn = new MIConnection()) {
>             using (MICommand micomm = miconn.CreateCommand()) {
>                 micomm.CommandText = "DELETE " + table + " WHERE
MI_KEY = '" + miKey + "'";
>                 miconn.Open();
>                 micomm.ExecuteNonQuery();
>             }
>         }
>         activeMapControl.Refresh();
>     }
>     catch {
>         MessageBox.Show("Hata oluÅ&#65533;tuÄ&#65533;u için nesne
silinemedi.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
>     }
> }
>
>
> Kolay gelsin.
>
> Mustafa Ozcetin
>
> Arastirmaci / Yazilim Uzmani
> TUBITAK UEKAE / G222 Birimi
> Ataturk Bulvari No:211/20 Kavaklidere / ANKARA
>
>
>
> --- On Thu, 7/9/09, mutlu1711 <mutlu1711@...> wrote:
>
> From: mutlu1711 <mutlu1711@...>
> Subject: [MapinfoTurkiye] Mapxtreme Desktop UygulamasÃ&#65533;±nda Nesne
Silme
> To: MapinfoTurkiye@yahoogroups.com
> Date: Thursday, July 9, 2009, 9:54 AM
>
> merhaba,
>
> MapXtreme ile Visual Studio 2008 ortamÃ&#65533;±nda geliÃ&#65533;tirmekte
olduÃ&#65533;um bir desktop uygulamasÃ&#65533;±nda;
>
> Select Tool ile seÃ&#65533;§tiÃ&#65533;im nesneyi silmek iÃ&#65533;§in
kullandÃ&#65533;±Ã&#65533;Ã&#65533;±m buttona tÃ&#65533;±klayÃ&#65533;±nca
seÃ&#65533;§tiÃ&#65533;im nesne o katmanda oluÃ&#65533;turulan ilk nesne
deÃ&#65533;il ise silme iÃ&#65533;lemi baÃ&#65533;arÃ&#65533;± ile eksiksiz
gerÃ&#65533;§ekleÃ&#65533;iyor. seÃ&#65533;§tiÃ&#65533;im nesnenin
katmanÃ&#65533;±nda o anda kaÃ&#65533;§ tane nesne olursa olsun,
seÃ&#65533;§ilen nesne o katman iÃ&#65533;§in Ã&#65533;¼retilen ilk nesne ise
silme iÃ&#65533;lemini sadece feature iÃ&#65533;§in yapÃ&#65533;±yor.
Ã&#65533;¶znitelik bilgileri silinemiyor. silme iÃ&#65533;lemi iÃ&#65533;§in
yazdÃ&#65533;±Ã&#65533;Ã&#65533;±m satÃ&#65533;±rlar
aÃ&#65533;aÃ&#65533;Ã&#65533;±dadÃ&#65533;±r. katman iÃ&#65533;§in
oluÃ&#65533;turulan ilk nesnenin Ã&#65533;¶znitelik bilgisinin neden
silinemediÃ&#65533;i konusunda yardÃ&#65533;±mcÃ&#65533;± olursanÃ&#65533;±z
sevinirim.
>
> kolay gelsin...
>
> //p_mainlayer=seÃ&#65533;§ili nesnenin hangi katmana ait olduÃ&#65533;u
bilgisi
> int rc=mapTableRowCount(p_mainLayer.ToString());  // seÃ&#65533;§ili
nesnenin katmanÃ&#65533;±nda mevcut kaÃ&#65533;§ tane row olduÃ&#65533;u
tespit ediliyor.
> MIConnection conn = new MIConnection(); conn.Open();
> MICommand comm1 = new MICommand(); comm1.Connection = conn;
> if (rc>1)
> {
> if (p_keyColumn.ToString() == "id") //bazÃ&#65533;± tablolarda ilk kolonun
adÃ&#65533;± id olmadÃ&#65533;±Ã&#65533;Ã&#65533;± iÃ&#65533;§in bunun
kontrolÃ&#65533;¼ yapÃ&#65533;±lÃ&#65533;±yor.
> {
> comm1.CommandText = "Delete from " + p_mainLayer.ToString() +
>     " where " + p_keyColumn.ToString() + "=" + p_keyColumnValue.ToString();
> }
> else
> {
> comm1.CommandText = "Delete from " + p_mainLayer.ToString() +
>     " where " + p_keyColumn.ToString() + "='" + p_keyColumnValue.ToString()
+ "'";
> }
> }
> else if (rc == 1)
> {
> comm1.CommandText = "Delete From " + p_mainLayer.ToString();
> }
> MIDataReader midr=comm1.ExecuteReader();
> MapInfo.Data.Table table =
MapInfo.Engine.Session.Current.Catalog.GetTable(p_mainLayer.ToString());
> table.Pack(MapInfo.Data.PackType.All);
> comm1.Dispose();
> conn.Close();
> conn.Dispose();
>
>
>
>
> ------------------------------------
>
> ---------------------------------------------
> MapInfoTurkiye
>
> Listeden çikmak için / To unsubscribe:
> MapinfoTurkiye-unsubscribe@yahoogroups.com
> Ã&#65533;ye olmak için / To subscribe:
> MapinfoTurkiye-subscribe@yahoogroups.com
> Web Sayfasi: http://groups.yahoo.com/group/MapinfoTurkiye
> Dosyalar: http://www.yahoogroups.com/group/MapinfoTurkiye/files/
>
> NOT:Gruba gönderilen yazilardan sadece gönderen kisi sorumludur.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





Fri Jul 10, 2009 7:31 am

mutlu1711
Offline Offline
Send Email Send Email

Forward
Message #7261 of 7415 |
Expand Messages Author Sort by Date

Ben silme isleminde asagidaki gibi bir kod kullandim ve boyle bir problem yasamadim: public static void deleteFeature(string table, string miKey) {     try...
Mustafa ÖZÇ...
mustafaozcet...
Offline Send Email
Jul 10, 2009
5:24 am

merhabalar, mustafa bey öncelikle ilginiz ve cevabýnýz için teþekkür ederim. fakat malesef ayný sorun devam ediyor....
mutlu1711
Offline Send Email
Jul 10, 2009
7:31 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help