Upgrade SQL CE 2.0 database to SQL CE 3.5 database - compact-framework

Has anybody performed the upgrade?
If yes, how is it done. I remember tinkering with running a program on command line on the PDA and that it did not work as expected.
Has running the command line program on the PDA worked for anyone?

Sorry for posting the question. We were able to upgrade the project using the method below.
We had to copy the upgrade.exe to the PDA tough.
System.Diagnostics.Process p = System.Diagnostics.Process.Start(
#"\Program Files\client\upgrade.exe"
, #"/s ""\Program Files\client\database.sdf"" /sp ""password"" /d ""\Program Files\client\convertedDB.sdf"" /dp ""password"" /e /q");
Hopefully someone finds this helpful.

If you're doing this programmatically, why hack using the Upgrade utility? Why not just use the Upgrade method present in the SqlCeEngine class?

Related

Legacy ArcGIS system on Windows 2012 with ArcSDE 10.2.2 won't connect

I'm currently working on a legacy system that's being rewritten by another contractor. Our mandate is to just keep the lights on until the rewrite is complete. So I understand all of what I'm listing is very old and out of date.
We have a java process that makes a direct connection to a 10.1 SDE. On windows 2008 server it works fine and everything is great. With windows 2008 coming to end of life we have to move to Windows 2012 or 2016. We have a sandbox setup for both environments. But using the same exact setup as on the Windows 2008 server, we get a very generic error
We believe the problem is in the connection binaries of the ArcSDE 10.2.2 library we are using.
The technologies we are using that seem to encapsulate the process that's failing:
Oracle 12c,
IBM Java 7,
Geotools 10.6, and
ArcSDE 10.2.2 (With a few ArcSDE 9.3 dll's thrown in, this may be key but we aren't sure. Specifically sdejavautil.dll)
The error we are getting is:
2019-12-11 22:56:31,454 ERROR [Thread-19] wfdss.framework.gis.geotools.ArcSDEFacade (ArcSDEFacade.java:165) - org.geotools.arcsde.ArcSdeException: Can't create connection to 10.1.10.92 for Session #1[SDE error -51 Unknown error][Error desc=DATABASE LEVEL ERROR OCCURRED.][Extended desc=Unknown error
]
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:621)
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:575)
at org.geotools.arcsde.session.Session.issue(Session.java:180)
at org.geotools.arcsde.session.Session.<init>(Session.java:166)
at org.geotools.arcsde.session.SessionPool$SeConnectionFactory.makeObject(SessionPool.java:384)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.geotools.arcsde.session.SessionPool.<init>(SessionPool.java:155)
at org.geotools.arcsde.session.SessionPoolFactory.createPool(SessionPoolFactory.java:69)
at org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore(ArcSDEDataStoreFactory.java:268)
at org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore(ArcSDEDataStoreFactory.java:259)
at wfdss.framework.gis.geotools.ArcSDEFacade.getDataStore(ArcSDEFacade.java:176)
at wfdss.framework.gis.geotools.ArcSDEFacade.getFeatureSource(ArcSDEFacade.java:154)
at wfdss.framework.gis.geotools.ArcSDEFacade.getTransform(ArcSDEFacade.java:738)
at wfdss.framework.gis.geotools.ReferenceShape.getProjectedGeometryBasedOnReferencePoint(ReferenceShape.java:593)
at wfdss.framework.gis.geotools.CommonGeoOps.getDistanceInMilesBetweenPointAndPoly(CommonGeoOps.java:2819)
at wfdss.framework.database.assessment.IncidentShapeBizFacade.checkIfFirePerimeterExceedsMaxDistToPtOfOrigin(IncidentShapeBizFacade.java:96)
at wfdss.framework.gis.ShapeFileHandler.uploadShape(ShapeFileHandler.java:556)
at wfdss.framework.gis.ShapeFileHandler.processShapes(ShapeFileHandler.java:255)
at wfdss.framework.gis.ShapeFileHandler.processUpload(ShapeFileHandler.java:199)
at wfdss.framework.gis.service.ShapeService$ShapeThread.shapeUpload(ShapeService.java:824)
at wfdss.framework.gis.service.ShapeService$ShapeThread.run(ShapeService.java:462)
at java.lang.Thread.run(Thread.java:795)
Caused by: com.esri.sde.sdk.client.SeException: Unknown error
at com.esri.sde.sdk.client.SeConnection.x(Unknown Source)
at com.esri.sde.sdk.client.SeConnection.<init>(Unknown Source)
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:610)
... 21 more
The line of code that's failing is below. Again, all of the passed in params are the same as what's working on 2008. Something inside the createDataStore method is failing. Just looking for ideas if anyone has anything to share if they had a similar experience.
ArcSDEDataStoreFactory.createDataStore(dataStoreParams);
don't see too many GIS questions on here so thats why I clicked. Past Gis and geologist guy here.
I did some research and found this article. Hopefully its an easy fix as it was for this person.
http://www.forumtopics.com/busobj/viewtopic.php?p=1003011
If not I think maybe updating certain drivers that are being utilized by the methods may help. I remember having an issue with some sort of connection and I had to make sure all the drivers matched with what I was using. Also checking to make sure if the drivers I was using were the correct bit.
Sorry I don't have an exact solution, but just trying to help.
The answer ended up being that we needed to install the SDE and JDK binaries using the "compatibility" setting for the install exe.
To do that you just right click on any exe, go to properties, there's a "compatibility" tab. Then just choose the version of windows you want to make ti compatible with.

Shell cmd in access vba returns error 5 - invalid procedure call or argument

I have used the Shell command in MS Access for several years in multiple databases in various versions. Most recently, I have received this Run-Time error 5 - invalid procedure call or argument on a Shell command I have used for many years. Can anyone tell me if there was a recent Windows update or possibly MS Office update that has caused this error to appear? I am currently using Office 2010 and Office 2013 and receiving the same error in both version on multiple computers. I have even tried creating a simple empty database and gone straight to the vba window and in the immediate window tried a simple Shell command as such:
Shell "C:\Notepad.bat", vbNormalFocus
Notepad.bat is a simple command inside it:
cmd /C "Notepad.exe"
The code:
Shell "Notepad.exe", vbNormalFocus
does work, but:
Shell "Cmd.exe", vbNormalFocus
still gives the same Error 5 message on every machine I test it on. Running the batch files from the Windows explorer works just fine. Any help is much appreciated.
After a lot more investigation, I happened on a new software installed by our network software engineers that maintain our McAfee protection. Last week, there was a blind install of a new app called Adaptive Threat Protection and is set to check for MS office apps running shell commands, especially the CMD type. This is set to automatically block all of these such commands. I finally came to a conclusion to look in anything recently installed or updated on my computer and happen to find a few different things installed within the last week date range. Thank you for your assistance and answers so far. The answer provided by thx1138v2 were something I also tried prior to my post but I figured for my 1st question I tried to keep my post to a bit of a minimum.
For anyone stumbling upon this issue, Windows Defender can also be the cause of this behavior.
You need to check if your Security Admin configured the Attack Surface Reduction capability of Windows Defender (through Intune, MEM, GPO...).
The specific rule you need to look for here is Block all Office applications from creating child processes (d4f940ab-401b-4efc-aadc-ad5f3c50688a).
You can easily verify this in the Windows Event Viewer, in Application Logs, Microsoft, Windows, Windows Defender and then Operational and looking for warning events of ID 1121.
Here is a screen capture (sorry, it's in French):
Note that only the GUID of the rule is shown, not the full name (the list of GUID can be found in the reference).
Or if you prefer using Powershell:
Get-WinEvent -ProviderName "Microsoft-Windows-Windows Defender" | Where-Object { $_.Id -eq '1121' }

Where does IntelliJ IDEA store database console scripts?

I couldn't find answer to this questions on SO despite long search. For some reason I thought I've seen it before.
Do you guys know in which file IDEA saves content of database console scripts ?
I thought it was in dataSources.ids but I don't see scripts there, only connection settings.
Try looking into the IntelliJ cache folder.
For me I did not find the database scripts themselves, but found a history of all the sql statements executed here :
`c:\Users\$user\.IntelliJIdea13\system\userHistory\*.xml`
(Am on IntelliJ Idea EAP).
On newer version of IntelliJ (2020+) for Mac it can be found here:
~/Library/Application Support/JetBrains/IntelliJIdeaYOUR_VERSION/consoles/db
If you are on Mac OS X, and as of IntelliJ IDEA 14, this gets stored here:
~/Library/Caches/IntelliJIdea14/userHistory/*.xml
I suspect that OS X updates sometimes clear ~/Library/Caches, because after the OS X 10.10.2 update I lost my database console history. If the contents of your database console are important to you, make sure you are backing up this folder and not excluding it in your Time Machine backup!
Update (2016/09/23): At some point they moved it out of Caches and into the preferences folder, which is good because you no longer have to worry about macOS updates wiping it out. For example, it is here in the current version:
~/Library/Preferences/IntelliJIdea2016.2/consoles/db/
Mac versions store it at :
~/Library/Preferences/IDEA version/consoles/db/
Adding Ubuntu default to the list of answers, ofc you change IntelliJIdea2020.1 with your version.
~/.config/JetBrains/IntelliJIdea2020.1/consoles

Can I add a new sprint (Fix Version) in YouTrack using a command?

Like the title says, I need to create a new fix version or sprint from my web app. I have mostly been using commands via YouTrackSharp to perform the tasks I need to, but I have got a bit stuck with this one. Anyone have any ideas?
Thanks
If you mean adding a completely new value to Fix Versions bundle (set of values), then it's not possible. You can do it only in administration part of your YouTrack.
In case you mean adding another fix version to an issue, just use the command 'add Fix versions '.
Regards,
Alexander

execute system command on rails - not working in production

On development everything works great. On production however, this line of code in a controller is no working:
output = `mclines #{paramFileName} #{logFileName} #{outputFileName}`
where mclines is a c program, and the rest are names of files. mclines is not executed on the production server, but it does on my laptop. I have no idea about what to fix. Have been trying different things for hours, but the truth is that I'm quite lost. In production the ssl in on, that's the only major difference.
If I execute the command on the shell, it gets executed. When I say it doesn't gets executed is because the first thing it should do is print some info in a file, and it doesn't. The server -as my laptop- is running ubuntu, but I have no idea about what logs could be usefull to read. systemlog had nothing usefull.
Any ideas that can lead to find the culprit are welcome.
Make sure mclines really exists on the production server, and use the full path to the mclines executable, as in
output = `/full/path/to/mclines #{paramFileName} #{logFileName} #{outputFileName}`.
Reference this
Try to print out your exit status code as:
$?.to_i
after the command...
or as pointed out in this link you can always use popen3/popen4 for better handling of input/output for system commands...