<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: what is problem of my code? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451435#M25798</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please ask in the appropriate Forum (after reviewing other similar posts).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2011 10:10:57 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2011-10-14T10:10:57Z</dc:date>
    <item>
      <title>what is problem of my code?</title>
      <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451431#M25794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;int CreateFileGDB(std::wstring filegdbPath,std::wstring filegdbName,Geodatabase &amp;amp;newFGDB)
{
 fgdbError hr;
 wstring errorText;
 Geodatabase geodatabase;

 wstring fgdb;
 fgdb.empty();
 fgdb.append(filegdbPath);
 fgdb.append(L"/");
 fgdb.append(filegdbName);

 //Try to delete exist the same filegdb
 hr = DeleteGeodatabase(fgdb);
 if (hr == S_OK)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "Find the GDB exist,then the origin geodatabase has been deleted" &amp;lt;&amp;lt; endl;
 }
 else if (hr == -2147024893)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "The geodatabase does not exist, no need to delete" &amp;lt;&amp;lt; endl;
 }
 else
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while deleting the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp; return -1;
 }

 // Create a new geodatabase in the parameter Path.
 if ((hr = CreateGeodatabase(fgdb, geodatabase)) != S_OK)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while creating the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp; return -1;
 }
 wcout &amp;lt;&amp;lt; "The geodatabase has been created." &amp;lt;&amp;lt; endl;
 newFGDB = geodatabase;
 return 0;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this code the error exist in line "newFGDB = geodatabase".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the error is : IntelliSense: "FileGDBAPI::Geodatabase &amp;amp;FileGDBAPI::Geodatabase::operator=(const FileGDBAPI::Geodatabase &amp;amp;)" (code the line: 283,belong file: "F:\SoftWare\ArcGIS\FileGDB_API_VS2010_1_0Final\samples\..\include\Geodatabase.h") &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks very much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451431#M25794</guid>
      <dc:creator>hexuezhou</dc:creator>
      <dc:date>2021-12-11T20:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: what is problem of my code?</title>
      <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451432#M25795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 1.1 version of the FileGDB API was released back in August;&amp;nbsp; you probably want to try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;using that before visiting the &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/forums/126-File-Geodatabase-API"&gt;File Geodatabase API forum&lt;/A&gt;&lt;SPAN&gt; to ask further questions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 01:54:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451432#M25795</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-10-14T01:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: what is problem of my code?</title>
      <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451433#M25796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks all the same!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 02:13:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451433#M25796</guid>
      <dc:creator>hexuezhou</dc:creator>
      <dc:date>2011-10-14T02:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: what is problem of my code?</title>
      <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451434#M25797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#include &amp;lt;string&amp;gt;
#include &amp;lt;fstream&amp;gt;
#include &amp;lt;iostream&amp;gt;

#include &amp;lt;FileGDBAPI.h&amp;gt;
#include "CSchemas.h"

using namespace std;
using namespace FileGDBAPI;

int main()
{
 int iexecuteStatus;
 Geodatabase newFGDB;
 //1.Create File Geodatabase(path,name,gdb)
 iexecuteStatus =CreateFileGDB(L"C:/Temp",L"test1.gdb",newFGDB);
 if(iexecuteStatus!=0)
 {
&amp;nbsp; wcout&amp;lt;&amp;lt;L"create file geodatabase error!"&amp;lt;&amp;lt;endl;
&amp;nbsp; return -1;
 }

 return 0;
}

//Create File Geodatabase for Format Convertion
//Author: Hexz 
//CreateTime:2011-10-13 
//Version:1.0
//Revision:No
int CreateFileGDB(std::wstring filegdbPath,std::wstring filegdbName,Geodatabase&amp;amp; pnewFGDB)
{
 fgdbError hr;
 wstring errorText;
 Geodatabase geodatabase;

 wstring fgdb;
 fgdb.empty();
 fgdb.append(filegdbPath);
 fgdb.append(L"/");
 fgdb.append(filegdbName);

 //Try to delete exist the same filegdb
 hr = DeleteGeodatabase(fgdb);
 if (hr == S_OK)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "Find the GDB exist,then the origin geodatabase has been deleted" &amp;lt;&amp;lt; endl;
 }
 else if (hr == -2147024893)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "The geodatabase does not exist, no need to delete" &amp;lt;&amp;lt; endl;
 }
 else
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while deleting the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp; return -1;
 }

 // Create a new geodatabase in the parameter Path.
 if ((hr = CreateGeodatabase(fgdb, geodatabase)) != S_OK)
 {
&amp;nbsp; wcout &amp;lt;&amp;lt; "An error occurred while creating the geodatabase." &amp;lt;&amp;lt; endl;
&amp;nbsp; ErrorInfo::GetErrorDescription(hr, errorText);
&amp;nbsp; wcout &amp;lt;&amp;lt; errorText &amp;lt;&amp;lt; "(" &amp;lt;&amp;lt; hr &amp;lt;&amp;lt; ")." &amp;lt;&amp;lt; endl;
&amp;nbsp; return -1;
 }
 wcout &amp;lt;&amp;lt; "The geodatabase has been created." &amp;lt;&amp;lt; endl;

 return 0;
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have used version1.1 ,but vs2010 show the same error!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as code paste in the thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;could help&amp;nbsp; my code error?&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:08:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451434#M25797</guid>
      <dc:creator>hexuezhou</dc:creator>
      <dc:date>2021-12-11T20:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: what is problem of my code?</title>
      <link>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451435#M25798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please ask in the appropriate Forum (after reviewing other similar posts).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2011 10:10:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/what-is-problem-of-my-code/m-p/451435#M25798</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2011-10-14T10:10:57Z</dc:date>
    </item>
  </channel>
</rss>

