Results 1 to 8 of 8

Thread: [RESOLVED]vb.net 2003 setup project doesn't work on another sqlserver

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Resolved [RESOLVED]vb.net 2003 setup project doesn't work on another sqlserver

    hi!!!
    i have deployed a windows application in vb.net 2003 with an sqldatabase on my sqlserver...
    i have deployed my database and i want to install sql server and my database on another computer and give my setup to the client.
    if i do that it doesn't work...
    what i have to do in order to work????
    Last edited by laxano82; Feb 6th, 2006 at 04:49 AM.

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    Have you made sure that the connectionstring in your application is using the correct SQL Server Name?

    Ideally I would put all the connection strings in the App.Config file, so that even if the Server Name or something else changes, I will just have to update the app.config and not the actualy source code.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    sorry because i'm new to that where is the appconfig file????
    and what do i have to write in there???
    i have only one connection string showing my sqlserver!!!
    do i have to include to my set up any files for the authentication of the database????(i don't know...)

  4. #4
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    In your connectionstring you might have used a Server Name to connect to a database on that server. And when you deploy you application, how are you making sure that the user will also have the SQL Server with the same name.

    You should read this from MSDN.
    Introduction to Dynamic Properties This should clear most the confusion that you might be having regarding my previous post.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    Quote Originally Posted by laxano82
    sorry because i'm new to that where is the appconfig file????
    App.Config File

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    If your talking about SQL SErver and not the MSDE then your client will need to purchase SQL Server and possibly some CALs.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: vb.net 2003 setup project doesn't works on another sqlserver

    we have purchased a new sqlserver!!!
    i have changed my appconfig file
    Code:
    ?xml version="1.0" encoding="windows-1253"?>
    <configuration>
      <appSettings>
        <!--   User application and configured property settings go here.-->
        <!--   Example: <add key="settingName" value="settingValue"/> -->
         <add key="OledbConnection1.ConnectionString" value="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=Fortotika;Data Source=team18;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;"></add>
         <add key="sqlConnection1.ConnectionString" value="workstation id=STAMELMA;packet size=4096;integrated security=SSPI;data source=team18;persist security info=False;initial catalog=Fortotika"></add>
         <add key="sqlConnection2.ConnectionString" value="workstation id=STAMELMA;packet size=4096;integrated security=SSPI;data source=team18;persist security info=False;initial catalog=Fortotika"></add>
    
    
      </appSettings>
      
    </configuration>

    and in my form i have written
    Code:
    Me.OleDbConnection1.ConnectionString = CType(System.Configuration.ConfigurationSettings.AppSettings.GetValues("OledbConnection1.ConnectionString")
    (i found that in the msdn link above)
    but the ctype does not work because the converting into type is not declared!!!
    i have put string but it doesnt work...
    any ideas?????

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    18

    Re: vb.net 2003 setup project doesn't work on another sqlserver

    i found the mistake!!
    it works if you write
    Code:
    Me.OleDbConnection1.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings("Oledbconnection1.ConnectionString")
    you don't need the ctype()
    thank you both!!!!

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