Jump to content

Link FDO Connect SHP File and SQL Data


browlinson

Recommended Posts

Using Map 3d 2011.

 

I am wondering if this is possible.

 

Can I link up feature data (parcels, with a unique id) from a SHP file that is FDO connected to data in a SQL database (non-spatial, just a table with the unique id as above and some other data).

 

Is this possible?

 

I see how I could do a join if both the connections were through FDO. Also, if I had drawing data, then I could use a link template with the SQL connection...

 

Any thoughts on this?

 

I have been fighting with ODBC connections as well due to being on 64 bit, but that's another story :)

Link to comment
Share on other sites

Totally possible.

 

You can load up the SHP file via dataconnect (in your task pane, click the data button, connect to...) and go to add SHP connection and add your shape file there.

 

You can also do your FDO/ODBC connections through this method too. Likewise, if you don't want to do live editing (I wouldn't understand why, but some don't) you can create a connection via the autocad data ribbon in the insert tab and insert your data link there. You have to add the connection first then you can click update fields to update them.

Link to comment
Share on other sites

Thanks!

 

I do want to do this for live editing. I actually almost got it working last night.

 

I was able to create an ODBC connection to the SQL Database so I could connect to the non-spatial data.

 

My problem now is that I am not able to update the non-spatial data when viewing from the joined layer.

 

Just for clarification, this is what I am doing.

 

I have a SHP file of parcels. The shape file has a 'Roll Number' which is our internal unique identifier for a property.

I have created a SQL table that contains all Roll Numbers and one other column for zoning.

 

I connect these two data sources to the drawing and do a join on the Roll Number.

 

So far so good, I can view the properties and see the value for the zoning.

 

Problem is I can't update it. It is set as a non-editable field. I AM able to update it if I navigate (in the Data Table viewer) directly to the SQL source where I just see Roll Number and Zoning.

 

Is there something I need to do in order to be able to update this field from the map?

 

What I am hoping to do is bulk select parcels in order to assign zoning values.

 

If some of this doesn't make sense, let me know and I can post some screenshots or something... haven't had coffee yet.

 

Cheers!

Link to comment
Share on other sites

Unfortunately, I can't really answer your question about the SQL tables, because at our office in Cambridge, we use an oracle connection to enter data (because we have more than 1 technician working on the same map at a time). But if you have the roll number joined with your shape file, you should be able to edit it there. Usually, Map uses the featID column as the main, uneditable reference. This might have to do with the roll number being the key join property in your data table. Try creating a unique Identifier (like, a customer ID number or something) and redirect that as the main join in your data table.

 

Did you check out the feature? And do you have the Auto checkout feature option on? You will need to either checkout the feature to edit it, or you should turn on the auto checkout feature option on so that it checks out the feature when you start typing.

 

Sorry I couldn't be much more help, hope it works!

Edited by Jwilson
added an idea!
Link to comment
Share on other sites

The Roll Number is a unique identifier (like a cust id would be). I am not trying to edit that field, I am trying to edit the other field in the SQL table (zoning), and it is uneditable.

 

Thanks though!

Link to comment
Share on other sites

The Roll Number is a unique identifier (like a cust id would be). I am not trying to edit that field, I am trying to edit the other field in the SQL table (zoning), and it is uneditable.

 

Thanks though!

 

Just a quick question, did you try checking out the feature first?

Link to comment
Share on other sites

  • 1 month later...
I didn't try that.

 

I just tested it now, and it is the same problem, 'zoning' is uneditable.

 

Thanks again.

On a join you can only edit the orginal data, any fields from the joined table have to be editted in the SQL table. You can create a SDF file from the join and edit there but if the SQL table gets updated you do not have the updated data in the SDF file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...