StrataFrame Forum

Connection string using "DataDirectory"

http://forum.strataframe.net/Topic10659.aspx

By Vikram Saxena - 8/1/2007

I am creating a windows application using strateframe, In my app config i am using connection string. however I am not able to use that same connection string with strateframe, its is not able fetch data and receiving exception as data out of bound,index -1.



Connection string I am using is



connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\App_Data\ISOCOM.mdf;Integrated Security=True;User Instance=True;"



Also let me know as if i can use "DataDirectory" in my connection string to access data through strateframe. As I am facing this issue after changing connection string in above format.



waiting for early response, Thx in advance.
By Trent L. Taylor - 8/2/2007

I am a bit confused about what you are trying to accomplish.  I don't see any reason that your connection will not work.  But StrataFrame does not use the connection strings in the app.config file.  You can pull them from there if you would like, but all connections in SF have to be added to the DataSources collection.

MicroFour.StrataFrame.Data.Databasics.DataSource.Add(New SqlDataSourceItem("","Your Connection String"))