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!
Solved! Go to Solution.
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...
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
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.
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?
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.
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!
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_.
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.
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.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.