Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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 ...
user avatar
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 ...
Thunder's user avatar
  • 10.7k
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 ...
sagesky36's user avatar
  • 4,642
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: ...
MarioDS's user avatar
  • 13k
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 ...
Corgalas's user avatar
  • 149
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 ...
m.edmondson's user avatar
  • 30.7k
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; ...
Mario's user avatar
  • 81
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 ...
Vineet's user avatar
  • 81
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 ...
Wayne Werner's user avatar
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 ...
Jeremy's user avatar
  • 3,950
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 ...
spacemunkee's user avatar
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 ...
CompleteNewb's user avatar
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 '...
paulcheil's user avatar
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="...
user3779804's user avatar
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 ...
Juan Gous's user avatar
  • 249
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 ...
Mahsa's user avatar
  • 373
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 ...
MatsT's user avatar
  • 1,769
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. ...
Simon Wray's user avatar
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 ...
Dragoljub Ćurčić's user avatar
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\...
Rezek17's user avatar
  • 23
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 ...
user3232927's user avatar
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 ...
StealthRT's user avatar
  • 10.3k
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="...
JADE's user avatar
  • 523
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 ...
farkhunda's user avatar
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 ...
NginxNewb's user avatar
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 ...
BJ Davey's user avatar
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 ...
Laurence's user avatar
  • 7,793
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 ...
Alston's user avatar
  • 2,117
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 ...
user avatar
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....
Papa Dragon's user avatar
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.
user997611's user avatar
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 ...
Ronnie Adriane Baetiong's user avatar
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 ...
Rob P.'s user avatar
  • 15k
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 ...
Arvid Theodorus's user avatar
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: ...
AeroSphinx's user avatar
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"...
alybaba726's user avatar
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 ...
JonH's user avatar
  • 33k
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 ...
CWilson's user avatar
  • 435
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 ...
Foxseiz's user avatar
  • 300
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 (...
DMill's user avatar
  • 303
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 ...
Vivek Murli's user avatar
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 ...
ZipionLive's user avatar
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 ...
konin's user avatar
  • 5
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'...
Andy's user avatar
  • 656
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....
usminuru's user avatar
  • 341
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 ...
John's user avatar
  • 775
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....
Chris Davis's user avatar
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....
Aouie's user avatar
  • 119
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 ...
Lucas Juan's user avatar
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=...
response.write's user avatar

1
2 3 4 5