|
-
Feb 3rd, 2006, 08:41 AM
#1
Thread Starter
Junior Member
[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.
-
Feb 3rd, 2006, 08:44 AM
#2
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
-
Feb 3rd, 2006, 08:52 AM
#3
Thread Starter
Junior Member
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...)
-
Feb 3rd, 2006, 09:01 AM
#4
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
-
Feb 3rd, 2006, 10:30 AM
#5
Re: vb.net 2003 setup project doesn't works on another sqlserver
 Originally Posted by laxano82
sorry because i'm new to that where is the appconfig file????
App.Config File
-
Feb 3rd, 2006, 10:40 AM
#6
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Feb 6th, 2006, 04:07 AM
#7
Thread Starter
Junior Member
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?????
-
Feb 6th, 2006, 04:47 AM
#8
Thread Starter
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|