Results 1 to 15 of 15

Thread: vb.net run project in other pc without askin for sql server

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    vb.net run project in other pc without askin for sql server

    Hello i have published an project and want to know how to make not asking for sql server, i want when i install my project after it it must be loaded not opening sql server and connect database, how to make database load after i install my project!

    thank you

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: vb.net run project in other pc without askin for sql server

    It's not clear to me what you mean. If your application uses SQL Server then SQL Server needs to be installed. Are you asking how to have your application not use SQL Server as a database, or that you want to install SQL Server if it isn't already, or something else?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    I want when i install my project on another pc database to load automaticlly ?? is that possible../?

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: vb.net run project in other pc without askin for sql server

    Yes it is, but exactly how depends largely on what type of database you are talking about. Some of them are as simple as copying a file. A few are just a file and can be created by the program, which means you don't even have to copy. On the other hand SQL Server has to be installed. That installation can be automated such that it installs as your program installs, but that installation has to take place, and it isn't as simple as just copying a file or two.
    My usual boring signature: Nothing

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: vb.net run project in other pc without askin for sql server

    SQL Server is a server-based RDBMS. If you want to use a SQL Server database then SQL Server needs to be installed somewhere. You might need it installed on the same machine as the application or it might just need to be installed on the same network. Are you deploying the MDF data file with your application? If so then the user needs SQL Server Express installed on their machine and there's nothing you can do about that. If you want to avoid the user having to install it themselves then you need to include it as part of your installer. Regardless, this question has nothing to do with VB.NET and everything to do with application deployment, so I'll ask the mods to move this thread to the appropriate forum.

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: vb.net run project in other pc without askin for sql server

    Thread moved to the 'Application Deployment' forum, which is where questions about installing/distributing your software belong

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    Anyone here to help me , i cannot run my vb.net application in another pc i dont know how to change the path of database for application can anyone help me . i already have sql server 2012. ?

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    Wich file i have to edit for Database path. can anyone tell me step by step

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: vb.net run project in other pc without askin for sql server

    We can't tell, because you aren't giving us anywhere near enough information.

    We don't know what kind of database you are working with (only that it fits within the many options provided by SQL Server), or how you have set up the connection to it (which could be in many different ways in code, or via several other methods).


    As things stand we can only give you a huge list of potential things, which would not only waste lots of our time, but also take longer for you than working it out yourself.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    I am using LocalDB, i have installed the program into another pc but when runnung says that sql network interfaces error 50. and i checked the database have the old location, how to load it via sql ? can anyone tell me wich file i have to add to retrieve database ?? bcuz i cannot connect to my application

  11. #11
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: vb.net run project in other pc without askin for sql server

    Quote Originally Posted by ali3nn View Post
    I am using LocalDB, i have installed the program into another pc but when runnung says that sql network interfaces error 50. and i checked the database have the old location, how to load it via sql ? can anyone tell me wich file i have to add to retrieve database ?? bcuz i cannot connect to my application
    LocalDB is only designed to work locally, if you want a version of SQL that can be used over the network then you would need to look at SQLExpress as a minimum version.

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>
        </configSections>
        <connectionStrings>
            <add name="top_dent.My.MySettings.Database_topdentConnectionString"
                connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database;Integrated Security=True"
                providerName="System.Data.SqlClient" />
        </connectionStrings>
        <startup>
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
        </startup>
    </configuration>

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    Here is my database LocalDB, how to run my application on another pc ? i dont know how to do it

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    72

    Re: vb.net run project in other pc without askin for sql server

    I am installing my software in another pc' and cant run i dont know how to configure database i only need to know wich file i have to uplaod in slq to run my project,

  15. #15
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,296

    Re: vb.net run project in other pc without askin for sql server

    LocalDB is intended for development. If you are deploying the MDF data file with your application then you need a SQL Server installed on the same machine. I'm not 100% sure but it may also be the case that only SQL Server Express allows databases to be attached on demand. I've never tested that to see. Anyway, if you'd bother to do a bit of reading then you'd know that the Data Source value in your connection string specifies the SQL Server instance that you're attaching the data file to.

    If you're attaching to a different SQL Server instance after deployment then it's that Data Source value that you have to change. It's the very same server/instance name as you would use to connect in SQL Server Management Studio. You can use a dot alone or "(local)" to represent the local machine and, if it's a default instance, that's all you need. If it's a named instance then you need that name too.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width