Connection string using "DataDirectory"


Author
Message
Vikram Saxena
Vikram Saxena
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: Forum Members
Posts: 41, Visits: 99
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.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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"))

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search