Question Drag/Drop Data binding in Express Edition

PeterH

New member
Joined
Jul 18, 2009
Messages
3
Programming Experience
10+
In the Express Edition, I was wondering how to drag/drop bound fields to the form like you can do if your DB is in local SQL/Server, from a remote SQL/Server.

I am aware I can do this all in code with SQLConnection, SQLAdapter controls. I can then FILL/Update a dataset control in code, but it appears you can't do this at design time.

I'm also aware that Professional edition ($500+) has a server connect, but I don't have this.

Am I correct that in the express edition, this all has to be done in ado.net code?

Second question, if I were to have a replica of the database local and drag/drop and design the form from there, how do I then change the datasource to an external DB?

I've tried endlessly to look this up, so if anyone can point me to a reference, that would be great. Thx.
 
Your use of the term drag/drop is confusing me, do you just mean bind a control to a field in the table - if so you bind it in the designer in the properties window under databindings. This of cource is done after you setup the datasource so you can pick the field.
 
I don't see how to do this in the Express edition where no database object can be added unless it's the local SQL/Server (which in my case won't work unless I develop local and then somehow switch it).

In order to "pick fields", don't you need a database listed in the Data Sources? Express and standard edition only allows local database... Otherwise, you need server explorer which is only in professional edition.

I see a .net reference for SQLDataSource but even when checked, there isn't a control in the toolbox by this name. If you drag over a SQLconnection control, under connection string you can't specify one, you can only choose from a local database dialog.

It does work from code, just not in designer.

Is there another way or concept I'm missing?
 
Do you have an SQL version loaded on your machine? Your connection string is what makes it talk to a remote DB vs as local one.
 
Thanks for trying to help.

I am not a new user to Microsoft software development. My question relates specifically to the limitations of vb.net Express edition.

Of course, I know what a connection string is and how to use them. I also know how to do everything I need in code. Apparently, I am not asking the question the right way.

I just had the simple question of whether it can be done design-time.

If you drag over a SQlConnection control to the form, then go to properties and choose connection string then "Add Connection" (in the Express edition, and I think also the standard edition), you don't get any opportunity to put in the actual connection string. You only get an "Add Connection" dialog and this has the DataSource "change" button greyed out.

In the SQL Connection control, you can only choose from data sources that can be added to the Data Sources explorer. Since there is no server explorer in the Express edition, it only lets you add a local data source, not a remote SQL/Server connection.

So, I think I have three choices:

(1) do it all in code; not really that big of a deal
(2) buy the professional edition for $500.
(3) develop it all with the local SQL/Server (express) and then switch it over to a remote in code (not sure how to do this without trying it out - probably just assigning the correct connection string to the SQLConnection control in code).

or

(4) something altogether I missed; hence my post.

Thanks
 
Back
Top