[fdo-users] OGR ConnectionString Testing

Traian Stanev traian.stanev at autodesk.com
Mon Mar 3 10:26:28 EST 2008


It parses the connection string when you call SetConnectionString() and internally stores it in a name-value collection -- so if your connection string is not syntactically correct, it is possible that it would not remember it.

If you call GetConnectionString() subsequently, it will construct the connection string from the name value collection rather than from the string you originally specified.

Traian


> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-
> bounces at lists.osgeo.org] On Behalf Of Crispin @ 1Spatial
> Sent: Monday, March 03, 2008 3:19 AM
> To: fdo-users at lists.osgeo.org
> Subject: Re: [fdo-users] OGR ConnectionString Testing
>
>
> I will reply to my own post...
>
> After some time it looks (to me) like the OGR provider verifies the
> connection string before a connection.Open is called.  Unlike the SHP
> provider that can contain rubbish in the ConnectionString and would
> then
> fail on the Open method the OGR will not persist an invalid
> ConnectionString
> when it is set???
>
>  C
>
>
>
> Crispin @ 1Spatial wrote:
> >
> > Hi,
> >
> > This is the first release I have been able to test using the OGR
> provider
> > due to previous issues.
> > However (not sure it is related to RC3?) with a .net application I
> cannot
> > set the ConnectionString property of the schema.  If I use a watch
> window
> > any values I set are not retained and the ConnectionString remains
> the
> > empty string.  All other providers I am working with at 3.3 RC2 are
> OK.
> >
> > Should I be doing something fundamentally different with OGR or is
> this a
> > bug?
> >
> >  Crispin
> >
> >
> > e.g.
> > manager =
> > OSGeo.FDO.ClientServices.FeatureAccessManager.GetConnectionManager();
> > connSchema = manager.CreateConnection("OSGeo.OGR.3.3");
> > connSchema.ConnectionString = "<ANYTHING HERE IS NOT SET>";
> >
> >
>
> --
> View this message in context: http://www.nabble.com/FDO-Open-Source-
> 3.3.0-Release-Candidate-3-Available-For-Testing-
> tp15750485s18162p15799415.html
> Sent from the fdo-users mailing list archive at Nabble.com.
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users


More information about the fdo-users mailing list