All Questions
Tagged with connection-string vb.net
236
questions
14
votes
9
answers
22k
views
Managing A Debug and Release Connection String
What is a good approach to managing a debug and release connection string in a .NET / SQLServer application?
I have two SQL Servers, a production and a build/debug and I need a method of switching ...
13
votes
4
answers
10k
views
winforms connection properties dialog for configuration string
Is there a way to display the connection properties dialog for connection string browsing(for database) in run time?
As I want the user to be able to connect to various database using the GUI.
The ...
10
votes
1
answer
20k
views
How to read a connectionstring in .net 4.5
How do I read a value from the web.config file for a connectionstring in the 4.5 .net framework?
I'm using system.configuration which I have a reference to and a using statement, but the only thing ...
9
votes
2
answers
26k
views
How to securely store a connection string in a WinForms application?
I need to know what is the common way to store a SQL server connection string for a WinForms application in VB.NET.
I have searched the net and I found answers to each of the following questions:
...
8
votes
5
answers
120k
views
VB.NET Connection string (Web.Config, App.Config)
Really having an annoying time with connection strings.
I have two projects together in a single solution. A Web forms application acting as the presentation layer, and a class library supporting it ...
5
votes
6
answers
687
views
Why do we need connection strings?
When we connect to a database in ASP.NET you must specify the appropriate connection string. However most other instances where data is to be specified is done within an object.
For example why ...
5
votes
2
answers
2k
views
Collation error 5175 in a conection to Advantage ADT files
I am developing an application in VB.NET which must be connected to a table Advantage (ADT)
I use the following connection string:
DSN=kantechX;DataDirectory=C:\DB\Data;SERVER=NotTheServer;
...
4
votes
3
answers
19k
views
How to add Failover Partner to a connection string in VB.NET
I have a windows application connecting to Database to read some data. Since the database is setup for resilience, my application needs to connect to one of the two databases. Can someone specify the ...
4
votes
5
answers
10k
views
How do I connect to SQL Server with VB?
I'm trying to connect to a SQL server from VB. The SQL server is across the network uses my windows login for authentication.
I can access the server using the following python code:
import odbc
...
4
votes
1
answer
6k
views
Iterate through connections strings in App.Config file in VB.Net
I am trying to iterate through all the connection strings in App.Config using VB.net.
I would like to:
1. Get a count of all the connection strings
2. Put them all into a listbox.
I have tried using ...
4
votes
0
answers
2k
views
calling adodb open changes connection string
I just got pulled into a project where we are converting old VB6 applications to .NET. Within the application they are passing around the ADODB connection object and grabbing the existing connection ...
3
votes
2
answers
43k
views
"The ConnectionString property has not been initialized" error in VB.NET
Every time I tried to connect to the database it give me this error "The ConnectionString property has not been initialized"
what can I do to solve this?
here are my codes
Module Module1
...
3
votes
1
answer
29k
views
How To Change The Connection String saved in My.Settings in VB 2010
I am writting an application and I used Wizard to create DataSets which auto-created their own xml code. This code uses the saved in My.Settings Connection String. Being a setting with an unchangable '...
3
votes
2
answers
946
views
The server tag is not well formed. QueryString and DataBinding
I've done a ton of research but with no luck finding a way to resolve this.
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" DataSourceID="...
3
votes
3
answers
379
views
Using entity model in class library
I have a project solution consisting of two class libraries and a Windows Application.
The two libraries are split into Custom_Classes and Custom_Controls.
Im my Custom_Classes library I have a ...
3
votes
4
answers
12k
views
odbc connection string dosen't work on windows 7
I use ODBC connection for my application (controlpanel -> administrativetools -> odbc -> DSN) to sql server 2008, and windows authentication
it works perfect on windows xp,
but now I run it on ...
3
votes
3
answers
3k
views
Choosing connectionstring in VB.NET application at startup
I have a VB.NET application with a connection to an SQL Server 2003. On the server there are two databases, MyDatabase and MyDatabase_Test. What I would like to do is to show a dialog when the program ...
3
votes
1
answer
173
views
Method/Property Error on New SQL Server Connection
I'm running VB .Net in VS2013, on a Windows 8 over SQL Server 2008 R2, and my creation of an SQL Connection is failing with the error:
Property access must assign to the property or use its value.
...
3
votes
3
answers
10k
views
Change connection string from class library in main application at run-time
You can change the connection string at run-time like this. You make the connection string setting available for writing as a separate property inside the MySettings class:
Partial Friend ...
2
votes
1
answer
665
views
ConnectionString not correct
I make windows application in Visual Studio 2010. Then i add a database.
The database properties is :
Name : C:\USERS\ADMINISTRATOR\DOCUMENTS\VISUAL STUDIO 2010\PROJECTS\WINDOWSAPPLICATION4\...
2
votes
2
answers
5k
views
Connect SQL Express 2012 vb.net
I have been working on this for a few days now. I am trying to make vb.net forms app for my database. Right now I am working on a login form and a main form. I have researched many different websites ...
2
votes
2
answers
40k
views
Connection string to Oracle 10g DB using VB.net
Hey all i am VERY new to a Oracle DB and i am trying to connect to it via VB.net 2010. I have been trying the following:
Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
Dim dr As ...
2
votes
3
answers
12k
views
How to read <connectionstring> of web.config from a console application?
I have VB.net console application. I would like to read the (ConnectionString) from a web.config.
Web.config is located at a particular path in my virtual PC, say "C:/mywebConfig"
<add name="...
2
votes
2
answers
13k
views
how can i dynamically change the connection string
I am using vb.net and SQL server 2005
I have a project with database classes which are generated from database objects. That is I add a dataset to the project and drag and drop a database object onto ...
2
votes
4
answers
6k
views
The ConnectionString property has not been initialized IIS 8.5
I have inherited a website from a friend to host as he fell out with the current person hosting it for him.
Its an old site, was hosted is IIS7 by looks of things and i cant get it online.
Im on a ...
2
votes
1
answer
1k
views
Advice in storing sensitive data in Windows Form Application vb.net c#
I'm currently working on a Windows Application Project and I have two problems in securing data.
First,I need to make a file that store a password as string which the user should enter it every time ...
2
votes
1
answer
2k
views
Error: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. in VB.Net
Although I found many posts with this same error, I couldn't find if my error is fixable or not.
There is a database which I have read permission with my window login on the network. I just use SSMS ...
2
votes
1
answer
8k
views
Login failed for user 'someone'
I work on Microsoft SQL Server 2008 R1 and visual studio 2010.
My target is to clone a server to a new machine. However, after setting the application up and entering "local/storytelling" in the ...
2
votes
2
answers
18k
views
ConnectionString property has not been initialized
I've looked at a lot of posts on different forums where others have received the same error. Most say they were not referencing the connectionstring from the web.config file correctly, or they were ...
2
votes
1
answer
2k
views
How to secure a connection string in memory after loading it from app.config in a Winforms application
I have a legacy application that uses a SQL Server authentication connection string to connect to a local or intranet based SQL Server instance. It currently uses the System.Configuration....
1
vote
4
answers
43k
views
Vb.net Connection String for Ms Access Database
What is the connection string for connecting MS Access 2010 (.accdb) database in VB.net.
1
vote
3
answers
1k
views
Changing the connection string on multiple forms
I have multiple forms in my project. Sometimes I work on my laptop, sometimes I work on my desktop. The problem is, when transferring my project from laptop to desktop and vice versa, I must change ...
1
vote
5
answers
2k
views
How do I programmatically tell if a client machine has the Microsoft.Jet.OLEDB.4.0 as a valid provider?
I need to export data into an Access database. My code works, but it works with the assumption the client machine has the Microsoft.Jet.OLEDB.4.0 as a valid provider.
I want to test to see if this ...
1
vote
4
answers
18k
views
VB.NET connection string for client-server application
Case :
I'm creating a desktop application with VB.NET (Windows Forms), and using SQL Server 2008 Express for its database.
Problem :
I want to create a client-server application, it means I just ...
1
vote
1
answer
161
views
How to fix "The ConnectionString property has not been initialized" in vb.net Visual Studio 2022?
I am using Visual Studio .NET Framework and vb.net programming language, I've been struggling to fix my error for about a week now. I used MS Access Database (.accdb) as my Database.
Module1.vb:
...
1
vote
2
answers
321
views
Retrieving default database connection string in code
I am working with the existing structures used by the dev team at my current company. In order to change connection strings within the application, the team creates an XML node called "defaultDatabase"...
1
vote
2
answers
3k
views
My.Settings.MyConnectionString works but app.config dont?
I'm not a WinForms developer, but have been doing ASP.NET for quite some time.
I have to write something in VB.NET that just pushes some simple data to a database.
So I created the VB.NET WinForms app ...
1
vote
2
answers
3k
views
multiple connection strings in single query
In VB, how do I join two statements from separate technology into a single recordset? Say I have 2 statements:
Select name from server1.dbo.table1 where attribute = "something"
select name from ...
1
vote
2
answers
6k
views
Connect SQL Server on button click VB.net
How to connect SQL Server on button click?
I want to manually enter the Server, Username and Password into textboxes.
I have a code here but I'm not sure if it's correct.
Private Sub ...
1
vote
1
answer
1k
views
ADO.NET Connection Pooling set to False
Under what scenarios would setting pooling=false in an ADO.NET connection string be of value when connecting to SQL Server? Assume, for this question, that the ADO.NET connection is called frequently (...
1
vote
1
answer
229
views
Setting a link dynamically for a vb.net project
I have created a project using Vb.net 2008 and I have created an installer for that.But I have hard coded the path to connect to the Access database using OLEDB.You must have seen the typical ...
1
vote
2
answers
9k
views
Can't get the connection string from app.config
I have a class library that contains classes shared by an asp.net web application and a WCF web service. The classes inside the library need to retrieve information from the database, and so the ...
1
vote
3
answers
3k
views
I cannot connect to SQL Server Express using VB.NET
Can someone tell me what I am missing? I am using this connection string to connect to my database and still it won't connect:
Dim str As String = "Provider = .NET Framework Data Provider for SQL ...
1
vote
1
answer
229
views
VB.Net OleDb Connecting to Previous Source
I have a simple application that's retrieving data from two different sources using the same OleDb provider. If I click btnSource1 it's supposed to retrieve data from url1 and if I click btnSource2 it'...
1
vote
1
answer
107
views
Connection string issue in VB.NET?
I have the following connection string class
Imports System.Data.SqlClient
Public Class DBConnection
Sub GetConnection()
Dim CrmsConn As New SqlConnection(System.Configuration....
1
vote
1
answer
93
views
Is it possible for hardcoded db details to be discovered
Good evening all,
Apologies if this is a obvious question, but I was wondering the following...
If i publish an app in VB which connects to a mysql database with its connection string hardcoded, is ...
1
vote
2
answers
2k
views
VB.NET relative path connection string
I need to make this connection string into a relative path so I can move my program from PC to PC without having to change the connection string every time. This is what I have in VB.NET:
con....
1
vote
1
answer
2k
views
Could not find installable ISAM
i need help. i encountered error after compiling my system in vb.net
Here is my code
Dim dtStudentPermit As DataTable
Dim dtExcelData As DataTable
Public constring As String = "Provider=Microsoft....
1
vote
1
answer
3k
views
Connection String For Local and Remote MSSQL SQL Insert Into
I have this code that will insert into the data from one table to another. The problem, is I am now trying to insert into a table from remote mssql server to my local mssql server. How will be the sql ...
1
vote
1
answer
294
views
I want my vb.net program with sqldb to be transferable
I'm having trouble with my vb.net program. It has a database with a SqlConnection string of:
DbConn = New SqlConnection("Data Source=ACE-DUO;Initial Catalog=db_CVSO;Persist Security Info=True;User ID=...