AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MAP 3D 2013: DRAWING & SQL SERVER SPATIAL ISSUES

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
rckohler
1843 Views, 13 Replies

MAP 3D 2013: DRAWING & SQL SERVER SPATIAL ISSUES

My drawing contains data connections to our SQL server spatial. Something happened to this drawing over the weekend that I can't seem to fix...

 

While opening the drawing, a dialog box pops up recommending not to open the drawing with errors; instead, open the drawing through a recover. I conduct the recover but, a 'damaged file' pop up displays, indicating the file was recovered, had zero errors, but erased one object. The message also says invalid data might have been changed or deleted. I hit 'close'.

 

Another dialog box pops up with 'unhandled exception...access violation...' I hit 'OK'.

 

The drawing opens but a warning bubble shows up saying,

'WARNING: The problems below were found applying style(s) to element MI_City_WGS84:

RDBMS: [Microsoft][SQL Server Native Client 10.0][SQL Server]Parameters were not supplied for the function 'Wolverine_GIS.dbo.fn_RoutePositionList_WGS84'.'

 

The bing map and one other data connection display, but all others don't. Nothing is in the display manager. Nothing shows connections anywhere. As soon as I click in the model space, a 'Fatal Error: Unhandles Access' message pops up & closes the program.

 

Any help would be greatly appreciated!

-Robyn

13 REPLIES 13
Message 2 of 14
rckohler
in reply to: rckohler

In addition to the above error messages, I tried to re-assign a coordinate system for the drawing, but no matter which one I choose, a message pops up saying 'Cannot save projection code to the drawing.' Ignoring that, I try to connect another feature from the SQL server spatial but, get the message 'There was a problem adding data to Map.'

 

Not sure where to go from here...

Message 3 of 14
philrue
in reply to: rckohler

When I ran into these problems.  I took the drawing .bak file and renamed it to drawing1.dwg file and opened that version, sometimes it worked, sometimes it didn't.  I also have cleared the C:\ProgramDataAutodesk\AutoCAD Map 3D 21013\R19.0\MapCache layers and .xml files (look for a .xml with your drawing name on it and delete).  I found out sometimes the .xml and layers will get corrupt if your drawing has crashed on you.  The drawing must be closed in order to delete these files. Good luck Phil

Message 4 of 14
rckohler
in reply to: philrue

I renamed the .bak file as you recommended & in my case, it didn't help anything when I opened that file up. Shows an identical situation as my original file. I searched my computer for the .xml file & didn't find it either.

 

Was curious about SQL server spatial data not working anymore for any file, but opening a new dwg & connecting to the same data as my bad file, data connects & displays fine.

Message 5 of 14
phil_borycens
in reply to: rckohler

Hi Robyn,

 

Unfortunately, I do not see that error message anywhere in our internal docs. I do see lots of results for "Parameters were not supplied for the function" and "sql server" in a web search though, so you might work with your DBA towards a solution...

 

Just curious, do you have any Joins active in this DWG?


Phil Borycens
Message 6 of 14
rckohler
in reply to: phil_borycens

I do not have any joins in my drawing. What is the benefit of using them? I'm new to Map 3D & haven't come across that option yet.

I have started fresh with multiple drawings & still receive these messages (see attachment pics). My current drawing consists of data connections through the 'Basemap Services' to Bing Maps & 'SQL Server Spatial'.

Please see attachments.

Thanks,

Robyn

Message 7 of 14
phil_borycens
in reply to: rckohler

Hi Robyn,

 

Joins are for when you want to fuse two data sources into one -- usually a database with attribute information is joined with a geospatial feature class. There needs to be a common field that has the same value in both sources to make the link happen.

 

As far as the screenshots you posted -- I'm not exactly sure what is going on, but some/all of those errors might be ignorable. You might want to 'audit' all of your layers in Display Manager and check them against your connections in Map Explorer. Do you have any duplicate data connections? Maybe you loaded some saved layers, and now the XML needs updating? (If you edited the XML of a layer, brought it back into Map3D, then tried to Edit its Style, it could certainly cause problems like the ones you showcase here. It's best to either use the Edit Style interface completely, or maintain the XML manually. You shouldn't mix the two.)

 

Some of the suggestions already posted to this thread might help too.

 

Other users, feel free to chime in if you know something more. Thanks!


Phil Borycens
Message 8 of 14
Murph_Map
in reply to: phil_borycens

My first guess is that the style was based on an attribute in the SQL table that the field name was changed somehow.

I would disconect from the SQL and delete the connection then add it back and restyle. Save and close then reopen the dwg again. If it was a new table (data) added to the  SQL database server the DBA may of ran a app to rename or change the field names. There is a different between Widgets and WIDGETS and widgets_.

Murph
Supporting the troops daily.
Message 9 of 14
rckohler
in reply to: Murph_Map

Murph,

As I follow your directions to fix this issue, I encounter a problem deleting a connection. I disconnected from the SQL server, then deleted the connections. All but one connection were deleted. I tried to delete it again & again, but every time I hit ok to delete the connection, it just ignores it. I saved the drawing & re-opened it, but still have the same issue. I closed AutoCAD Map 3D & re-opened it, but still have the same problem. Even restarting my computer didn't help. I'm going to continue anyway, but if you happen to know why that one connection is being stubborn, please let me know.

Thanks,

Robyn

Message 10 of 14
phil_borycens
in reply to: rckohler

Hi Robyn,

 

I know I'm not Murph, but I will share my ideas with you...

 

Try removing the connection in Task Pane > Map Explorer. Simply select the connection and click the Remove button. If for some reason this doesn't work, then...

 

Try going to the main application menu (upper left) and choose Export > DWG (this runs the MAPTOACAD command, which should strip out any Data Connections). Then open your exported drawing and try making the connection to SQL Server again.

 

Let us know how this goes.

 

Thanks!

Phil


Phil Borycens
Message 11 of 14
rckohler
in reply to: phil_borycens

Hi Phil,

Thanks for your input. I was able to remove all but one of the sql server connections through map explorer. It ignored the same one as mentioned earlier. I then exported to a dwg. Upon opening that exported dwg, an error message popped up indicating 2 errors were found & to not open the drawing; run a recover instead. I ran recover on the drawing & it found, fixed & erased 2 errors. All data connections were striped from the drawing like you said they would be. I connected the same data as I had before & still receive the warning message indicating invalid object name. I removed the layer that indicates the invalid object name & it still gives me the error after saving, closing & re-opening.

It seems as though because other layers are connected to the same sql server, it triggers this warning. I know this is a minor issue, as far as, the warning messages continually popping up, but it seems as though it's part of a bigger problem. If anything is renamed down the road within the sql server, it seems like I'll have this issue over & over. Isn't there some way for either the sql server or AutoCAD Map 3D to recognize when a change occurs & automatically update information used in Map 3D that is just referencing the sql server? Is this what's happening?

Thanks,

Robyn

Message 12 of 14
rckohler
in reply to: rckohler

I talked with our DBA about these issues. The 'Invalid object name' warning keeps popping up because this layer doesn't exist in the SQL server spatial anymore. So, any drawing created before this layer was deleted from the  server, will continue having these warnings pop up. All new drawings are warning free.

Thanks again everyone for helping me through this.

Message 13 of 14
phil_borycens
in reply to: rckohler

AWESOME! Thank you for the update Robyn. I appreciate you closing the loop on this.

 

Thanks to everyone else who chimed in too.


Phil Borycens
Message 14 of 14
frosty1_4me
in reply to: phil_borycens

Just seen this post, I'm having the same issue.  how was it resolved so that it no longer pops up in the drawings?

 

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost