I received this error while working on some ArcObjects Code.
Objects in this class cannot be updated outside an edit session.
It had to do with the relationships that I established inside the File Geodatabase I was saving to.
So I had to add a few lines and open up an EDIT SESSION on the workspace. I guess if you don’t have any relationships, you don’t need an edit session, but when you start using relationships you have to start opening up an edit session.
So here is my code. You will notice the 3 lines that open the IWorkspaceEdit and the last two lines that stop editing.
//First thing is to create a generic fGDB workspace factory class
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
//Create a workspace and point it to the fGDB file
IWorkspace workspace = workspaceFactory.OpenFromFile(DATABASE_PATH_WITH_ATTACHMENTS, 0) as IWorkspace;
IWorkspaceEdit edit = (IWorkspaceEdit)workspace;
//Add some EDIT code here to the DB...
//Remove references to the fGDB
workspaceFactory = null;
workspace = null;
datasets = null;
Something I couldn’t easily find on the interwebs so I decided to post it just incase anyone else had trouble with it.
//gets all features in featureclass
IFeatureCursor featureCursorGet = featureClass.Search(null, false);
//starts the first feature
IFeature feature = featureCursorGet.NextFeature();
//gets the column ID where we can find the report ID
while (feature != null)
feature = featureCursorGet.NextFeature();
An Email I wrote to one of my developers. Thought I would share.
So, lets just bring it down to one scenario.
I have a People's table and a Building's table. One table has a various amount of people including names, DOB and various other small tidbits about their life. The building has the same. Its name, its type, and address and various other tidbits.
Now, lets say I have an Images Table. I want to link images to the buildings and to the people. But all people and buildings have more than one image. Instead of adding a new column in that image table to describe the type of image it is for (also adding another table to describe the types of images). I just have one relation and that is a Item_Id. That image table is then queried when ever buildings or people are queried. Only searching for the people Guid or the Building Guid.
Now, lets say I have the images table again, but the people table and buildings table have INT's as their identifier. If I pull from the Images table all images that have an Item_Id == 5, I could get both personal pictures and building pictures. Including any other type of picture I take. And thats why I don't like to use INT's unless I am positively sure it won't cause adverse affects later on.
I found a Chrome bug today in the browser.
The background-color tag in CSS doesn’t seem to update when using hoverover or onclick commands.
So If I have something like this: http://demotivatedposters.com/posters/add
I wanted to hover over each image and change the css class to another class that had the background-color tag in it. But Chrome has a small bug that won’t update that tag. So I had to change the borders visually instead.
Looks like it was also reported here: http://stackoverflow.com/questions/425216/problem-with-background-color-and-google-chrome
So it looks like its not just me.
I just wanted to report the bug.
For those that are having a similar error to:
java.lang.OutOfMemoryError: GC overhead limit exceeded
Something that worked for me but was hard to figure out:
Increase the max memory. The default CF install sets it to 512 MB, if you have CF standard you can bump this to 1024 MB, with enterprise you can go beyond that, e.g.: -Xmx4096m
Found a small bug, more with the Zune software in WM7 than actual WM7 software.
The bug is as follows.
- I was playing a song yesterday on my WM7 Samsung Focus. The song never ended before I stopped listening to music.
- I plugged my phone into the computer to sync Zune and my music.
- I unplugged after the sync had ended.
- Tried to play music and it would play visually, but not via audio.
- So I could see it playing, but it wasn’t coming out of the headphones.
- So I turned the phone off and back on again and everything then worked again.
- Looks to me like a minor software bug.
Just thought I would post for the good of the community.
I created a brand new background for WM7 and figured I would share it out. This one is interesting because its transparent when unlocking the phone for the first time. You will have to take the file and either download it to your phone from this site, or send it to your self via email. The actual background is in the Zip file. The picture is just to show you what it looks like.
Once done, just open it and “use as wallpaper”.
Know issues with transparency:
1. Does not work with pin lock set
2. With certain apps open (like email for instance), you will see the bottom soft buttons through the wallpaper
So way back when Scott Hansleman released RockScroll, I loved it. Now that I have upgraded to Visual Studio 2010, it isn’t compatible. So I went searching for another one just like it. I found a tool called AllMargins and I must say its by far the best damn tool for Visual Studio! I can’t get enough of it. It adds on to your scroll bar give you vast amounts of information to view right away. Its soo wonderful. Go ahead and give it a try! I sure did and love it!
Got this Error when installing and Starting up OpenFire for the first time with the new Beta release of Openfire 3.7.0.
Could not listen on port: 5229
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I had to figure out what was already bound to that Port and shut the service down.
So to figure out what port to release
- type 'Netstat -a -n -o' on your command prompt
- Note the PID corresponds to the port which you want to release
- type the command 'tasklist /svc /FI "PID eq <THEPID>”’
- Note the task name listed on command prompt (below Image name)
- Kill that task from taskmanager
Hope It helps someone