Arcengine hresult: 0 × 80040228 exception resolution

Source: Internet
Author: User

Hresult: 0x80040228 the exception is solved by a group of friends and asked this question.
As follows:
Guangzhou-cangying (448362145) 16:48:41
An exception occurred when I used the above method to connect to the total.

I installed arcgis9.2,
I used the method you mentioned to connect, but there was an error message. Error message "error from hresult: 0x80040228"
My code is as follows:
Public iworkspace open_arcsde_workspace (string server, string instance, string user, string password, string database, string Version)
{
Try
{
ESRI. ArcGIS. esrisystem. ipropertyset propertyset = new ESRI. ArcGIS. esrisystem. propertysetclass ();
Propertyset. setproperty ("server", server );
Propertyset. setproperty ("instance", instance );
Propertyset. setproperty ("Database", database );
Propertyset. setproperty ("user", user );
Propertyset. setproperty ("password", password );
Propertyset. setproperty ("version", version );
Iworkspacefactory workspacefactory = new ESRI. ArcGIS. datasourcesgdb. sdeworkspacefactoryclass ();
Return workspacefactory. Open (propertyset, 0 );
}
Catch (exception ex)
{
Response. Write (ex. Message );
Return NULL;
}
}
Click the button to call the above functions in the event:
Open_arcsde_workspace ("nazirhasan", "esri_sde", "SDE", "Hasan", "", "SDE. Default ");
Host Name: nazirhasan
The SDE user is SDE
The SDE password is Hasan.

In fact, you only need to add a license control.

I hope you will not forget to add the license control when using simple programs in the future. Otherwise, you will not be able to find the problem for half a day.

From: http://bbs.esrichina-bj.cn/ESRI/viewthread.php? Tid = 14967

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.