Hi there,
I tried the example found in the help file to manually set up my dataconnection and first tried this:
DataLayer
.DataSources.Add(New SqlDataSourceItem("", "SERVER=.\SQL2008EXPRESS;INITIAL CATALOG=MyDB; Integrated Security = True"))
This works exactly like I expected it. But then I tried to insert a key
DataLayer
.DataSources.Add(New SqlDataSourceItem("MyKey", "SERVER=.\SQL2008EXPRESS;INITIAL CATALOG=MyDB; Integrated Security = True"))
which causes an error when loading a form which uses a businessobject.
Finally I tried it like in the help described
Dim lOSQL As New SqlDataSourceItem("MyKey", "SERVER=.\SQL2008EXPRESS;INITIAL CATALOG=MyDB; Integrated Security = True")DataLayer.DataSources.Add(lOSQL)
which is the same but it is split up in 2 lines of code. This caused the error too.
Can somebody help me and tell me what I am doing wrong?
Thanks in Advance
Thomas