Stored Procedure in DataSourceMoniker of ImportData medthod

webjagger
06-24-2004, 06:19 AM
I'm using MapPoint 2004, VB.Net and SQLServer and I wonder if and how it is possible to use a stored procedure inside the DataSourceMoniker of the ImportData method.
What I've allready done is

ImportData("db.udl!q_MyQuery", ...)

Another way might be to add the where clause to the DataSourceMoniker. Is that possible?

My problem is that I can't use different queries.
So anybody has an idea?

Thanks in advance.

Alex

Anonymous
06-24-2004, 06:12 PM
....afaik, you can't import from SQL server, just from MS Access. Hope I’m wrong!

You are on the right track with the moniker other than that. In Access you can definitely import from a query. Just use geoImportAccessQuery in the import flags. Note, I have found that is fails with very long path names...or of course if you have a ! in the path somewhere.

I assume you know where the docs are, but just in case:

http://msdn.microsoft.com/library/en-us/mappoint2004/BIZOMMImportData.asp?frame=true

Hope this helps.

webjagger
06-25-2004, 02:55 AM
Yes, ChrisA, you are wrong.
Inside that udl-file you can also specify a connection to a SQLServer.
I tried it and it works fine.

So I'm still hoping, that I get the problem solved to use a sp or get the where clause integrated somehow?!

 
Web mp2kmag.com
mapforums.com