7 Replies - 845 Views - Last Post: 25 September 2013 - 03:52 PM Rate Topic: -----

#1 frankwright1  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 07-May 12

installing vbnet on with sqlserver remote computer

Posted 01 September 2013 - 04:10 AM

Hi

I've created a vbnet application in visual basic that connects to sqlexpress database on the same computer on which I created the application. I use the connection string:

Dim cs As New SqlConnection("Data Source=myPC\SQLEXPRESS;Initial Catalog=myDatabase;Persist Security Info=True;User ID=sa;Password=password")

It works fine.

However, I have decided that I would like to be able to install the application onto other computers which are not connected to my server. So each application will have its own embedded database, with a button to sync the data with a mySQL database held online.


Do I have to create a whole new database, including all the tables etc? Or is there away to recreate the sqlserver held on my own PC onto the machine I am installing the application on?

I hope this is clear?

Thanks

This post has been edited by andrewsw: 01 September 2013 - 04:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: installing vbnet on with sqlserver remote computer

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,160
  • Joined: 12-June 08

Re: installing vbnet on with sqlserver remote computer

Posted 01 September 2013 - 10:30 AM

Quote

Do I have to create a whole new database, including all the tables etc?

On the local db file and mysql? Yes you will need to create the same table structure you use for mssql express for both.
Was This Post Helpful? 0
  • +
  • -

#3 frankwright1  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 07-May 12

Re: installing vbnet on with sqlserver remote computer

Posted 01 September 2013 - 02:35 PM

Thanks... darm that's a chore. But thanks.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3369
  • View blog
  • Posts: 11,417
  • Joined: 12-December 12

Re: installing vbnet on with sqlserver remote computer

Posted 01 September 2013 - 02:58 PM

View Postfrankwright1, on 01 September 2013 - 09:35 PM, said:

Thanks... darm that's a chore. But thanks.

Did you not keep the original SQL statements :)

In SQL Server Management Studio we can right click a table and choose Script Table As, CREATE To..

The code it creates is a little extensive, but we can edit it.

Spoiler

We can do the same for databases but it doesn't seem worthwhile doing this.

This post has been edited by andrewsw: 01 September 2013 - 02:59 PM

Was This Post Helpful? 0
  • +
  • -

#5 frankwright1  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 07-May 12

Re: installing vbnet on with sqlserver remote computer

Posted 16 September 2013 - 04:15 AM

Wow that is useful - thanks!

Is an *.sdf database the best way to go in your opinion? I've created one in visual studio, but can't see a folder for stored procedures.

Frank
Was This Post Helpful? 0
  • +
  • -

#6 Michael26  Icon User is online

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,521
  • Joined: 08-April 09

Re: installing vbnet on with sqlserver remote computer

Posted 16 September 2013 - 04:22 AM

Use sql server management studio, you will have everything you need there.

This post has been edited by Michael26: 16 September 2013 - 04:23 AM

Was This Post Helpful? 1
  • +
  • -

#7 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3369
  • View blog
  • Posts: 11,417
  • Joined: 12-December 12

Re: installing vbnet on with sqlserver remote computer

Posted 16 September 2013 - 04:36 AM

There is a useful MSDN link here about deploying a SQL Server Compact database.

The Compact version doesn't support stored procedures. Another MSDN link here discusses the reasoning behind this decision, but also provides a comparison of the Compact to Express versions. If you want to use SPs then you might consider the Express version instead.

This is just a wild guess, but perhaps there is less reason to use the Compact version than there used to be, because the overall acceptable size of applications, and storage media, has increased over the years.

This comparison page suggests that an Express LocalDB installation is very similar in size to that of the Compact version.

View PostMichael26, on 16 September 2013 - 11:22 AM, said:

Use sql server management studio, you will have everything you need there.

I agree that Management Studio is an excellent, perhaps essential, tool, but the Compact editions of SQL Server don't support stored procedures. Mind you, the link I provided above is from 2008, I don't know if this has changed? Added: No, I don't believe it has.

This post has been edited by andrewsw: 16 September 2013 - 04:41 AM

Was This Post Helpful? 1
  • +
  • -

#8 frankwright1  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 93
  • Joined: 07-May 12

Re: installing vbnet on with sqlserver remote computer

Posted 25 September 2013 - 03:52 PM

Do you mean the SQL Server 2012 LocalDB?

Frank
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1