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...
Want to share photos of your group with the world? Add a group photo to Flickr.

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
Mapxtreme Desktop Uygulamasında Nesne Silme   Message List  
Reply | Forward Message #7259 of 7415 |
merhaba,

MapXtreme ile Visual Studio 2008 ortamında geliştirmekte olduğum bir desktop
uygulamasında;

Select Tool ile seçtiğim nesneyi silmek için kullandığım buttona
tıklayınca seçtiğim nesne o katmanda oluşturulan ilk nesne değil ise silme
işlemi başarı ile eksiksiz gerçekleşiyor. seçtiğim nesnenin katmanında o
anda kaç tane nesne olursa olsun, seçilen nesne o katman için üretilen ilk
nesne ise silme işlemini sadece feature için yapıyor. öznitelik bilgileri
silinemiyor. silme işlemi için yazdığım satırlar aşağıdadır. katman
için oluşturulan ilk nesnenin öznitelik bilgisinin neden silinemediği
konusunda yardımcı olursanız sevinirim.

kolay gelsin...

//p_mainlayer=seçili nesnenin hangi katmana ait olduğu bilgisi
int rc=mapTableRowCount(p_mainLayer.ToString()); // seçili nesnenin
katmanında mevcut kaç tane row olduğ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ı tablolarda ilk kolonun adı id
olmadığı için bunun kontrolü yapılı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();





Thu Jul 9, 2009 1:54 pm

mutlu1711
Offline Offline
Send Email Send Email

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

merhaba, MapXtreme ile Visual Studio 2008 ortamında geliştirmekte olduğum bir desktop uygulamasında; Select Tool ile seçtiğim nesneyi silmek için...
mutlu1711
Offline Send Email
Jul 9, 2009
1:55 pm
Advanced

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