Click here to Skip to main content
15,897,032 members
Everything / Connection

Connection

connection

Great Reads

by ASP.NET Community
FtpWebRequestThe FtpWebRequest class enables you to programatically create FTP connections to FTP Servers and transfer files.  If you are
by ASP.NET Community
Confused how to use DataSet and How to use DataReader?I am trying to give some of basic understanding about and differences between DataReader
by gfazzola
In this article I will explain the implementation of an infrastructure to host and manage windows services in a practical and interactive way.As a practical example of the solution will be implemented a dynamic ip update client of DucDNS
by ASP.NET Community
Hosting a WCF Service with netTcpBinding on IIS7

Latest Articles

by ToughDev
Interesting findings about GSM SIEMENS TC35
by ToughDev
How to interface VS1053 Audio Encoder/Decoder Module with PIC using SPI
by Sauradipta Chaudhury
This is a coding solution to use Application Settings and Connection Strings sections under Configuration Menu in Azure Functions V2.x and above to store configurable entries.
by Uladzislau Baryshchyk
This series of articles consists of three articles, in which I will demonstrate step by step how to create a .NET core MVC project

All Articles

Sort by Score

Connection 

24 Feb 2013 by S. M. Ahasan Habib
The question is true for all technology for example .NET, PHP etc. When required for execute any database command/query then you should open database connection and after getting result you should close that connection. Only problem area you can find that is connected resultset fetching issue....
18 Sep 2013 by pasztorpisti
I've done this on client side only by specifying the list of accepted certificates. I've never tried to do this what certificate hash, I don't know whether the java api allows you to do this or not. If you have the certificates then you can specify them as trusted:...
11 Oct 2013 by ASP.NET Community
FtpWebRequestThe FtpWebRequest class enables you to programatically create FTP connections to FTP Servers and transfer files.  If you are
11 Oct 2013 by ASP.NET Community
Confused how to use DataSet and How to use DataReader?I am trying to give some of basic understanding about and differences between DataReader
10 Jan 2015 by Mehdi Gholam
Read the following : Understanding SQL Server Configuration Manager[^]How to: Enable Network Access in SQL Server Configuration Manager (SQL Server Express)[^]
22 Oct 2012 by Aadhar Joshi
If viewing SQL Server Configuration Manager you only see the SQLEXPRESS instance name, then the Standard edition you "installed" did not get installed properly or at all. If in the install of the Standard Edition you just clicked through the wizard it probably installed as the default instance....
3 Nov 2012 by Sandeep Mewara
Look here: MSDN: Creating an Entity Data Model from a Database[^]MSDN: Entity Data Model Wizard[^]
15 Feb 2013 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
24 Feb 2013 by MalwareTrojan
It is preferred to Open and Close the Connection each time you required.
24 Jun 2013 by Ron Beyer
If you are accessing the system from a Windows Forms application, then I would say yes (with the caveat of asking HostGator directly) you have to white-list them.Most providers only allow the database to be accessed from its domains. This is because they are meant to be the data back-end to...
22 Jul 2013 by Jason Gleim
So it looks like the issue may be somewhere in the flood of async calls going to the server but it is actually breaking on the client side. This makes me curious and I may write up a test program just to dig into this deeper and maybe write an article about it. There is something going on there...
1 Aug 2013 by Sushil Mate
You need to install 2007 Office System Driver: Data Connectivity...
16 Aug 2013 by André Kraak
Should string not be with a capital S - String[^].
7 Jan 2014 by Christian Graus
The correct solution in SQL Server is merge[^]. This allows you to check if something exists, and do either an update, or in insert, on that basis.
12 Feb 2014 by hari111r
Hi All,I want to create my own remote desktop web access page(RDWeb). I have a task to create a citrix like page that need to be linked with my web application. or is there any option to edit the RDweb pages.It that possible.Please help me comeout of it.
20 Apr 2014 by OriginalGriff
That code is...um...odd.You create a command (which is commented as a SELECT), execute it, but throw away the results, and then dispose of it, and close the connection.Then you try to do an INSERT operation...which presumably is giving you a problem.The SELECT code does nothing useful:...
15 May 2014 by Mehdi Gholam
127.0.0.1 is a loopback address for the local machine, you should be using the server machines lan ip address instead on your android device.run cmd.exe on your server and type ipconfig to see what your server's ip address is.
23 May 2014 by Regaloq
Hi i solved the problem.Click here for source
30 Jan 2015 by JLSto
Hi there everyone, I would likt to know if there are any benefits of using the sqlhelper class over your own Sql command code ? I know that its a lot less code for one, its just one line with the sql Parameters and sql statement.Thanks in advance for your assistance.
13 May 2015 by OriginalGriff
The error message is pretty specific: the IP address is wrong, or the SQL server on the far end at that IP address is not configured to accept connections from the internet.Start by checking wherever you got the SQL connection string from, then try to configure a connection in VS using the...
16 Jul 2015 by CHill60
Quote:But I have not found hsqldb library compatible with visual studio.According to the HSQLDB page[^] it's in the /dotnet folder of the referenced SVN repository[^]
22 Jun 2016 by Prateek Dalbehera
Hi Florida, Followings are the standard ways to create connection string in the cofig file of the application.Windows Authentication:
18 Nov 2016 by Dave Kreskowiak
First, you database should NOT be under Program Files. Everything under Program Files is ReadOnly. I'm guessing that's probably why you think you need admin permissions to run your app. Don't.The correct solution is to put your database under a more appropriate folder, like...
1 Dec 2016 by Jochen Arndt
If you use a single connection for two protocols you would have strictly speaking only one protocol because your client has to decide which kind of data handling has to be used and this decision is defined by the protocol.If the two protocols are not standard ones but defined by you just...
10 Dec 2016 by gfazzola
In this article I will explain the implementation of an infrastructure to host and manage windows services in a practical and interactive way.As a practical example of the solution will be implemented a dynamic ip update client of DucDNS
10 Apr 2017 by Michael_Davies
Not quite clear on how you access the database, if you are using 32 bit office on 64 bit system and are creating a DSN with ODBC connection manager you need to run the 32 bit version Odbcad32.exe, the one in control panel will be the 64 bit version and the registry keys are stored in different...
13 Oct 2017 by OriginalGriff
Web.config If you hard code the string you have to recompile the code when it changes. And it changes every time you do maintenance, or upgrades. Because if it doesn't, your code tests against the production database and everything you do risks disaster. If you forget the WHERE clause for an...
18 Oct 2018 by CHill60
I suggest reading the documentation first - Connecting to Oracle Database[^] - Database Web Services[^] The best language to use is usually the language you know best, but there are probably more examples available in Java. Give it a go but come back with a specific question if you get stuck
27 Oct 2018 by OriginalGriff
Check the configuration on the remote machine: it could be the MySql installation requires different credential (and I would seriously hope so, blank passwords on a DB are not a good idea particularly on an "admin" account) or it could be the firewall. See if you can find a working example...
10 Jan 2020 by OriginalGriff
If you find it working in C#, it will work in VB. There are a couple of sites that can convert the code for you: www.converter.telerik.com[^] is the one I use. But ... even easier is to use the C# code as is: add a reference to the assembly in your VB code and you can use the classes as if they...
15 Dec 2021 by Dave Kreskowiak
You're going to have to ask your work IT how to do it. The server could be exposed directly to the internet (bad idea!), or you might have to go through a VPN to get back into the work network (most likely), or you might have to use some proxy.
1 Nov 2015 by ASP.NET Community
Hosting a WCF Service with netTcpBinding on IIS7
29 Nov 2021 by Uladzislau Baryshchyk
This series of articles consists of three articles, in which I will demonstrate step by step how to create a .NET core MVC project
18 Sep 2012 by joshrduncan2012
Does anyone have any advice on why when I execute a program in Visual Studio 2012 my SQL Server CE local instance keeps losing connection? It's connected while I'm working in designer or code-behind, but when I execute the program to run it, I see a red X next to the database instance.
18 Sep 2012 by Aron Jay
Same here. Even after I do Imports System.Data.SqlServerCe, sqlceconnection, sqlcecommand and others are not available.
8 Oct 2012 by Thomas Daniels
Hi,Have a look here:http://digiassn.blogspot.be/2006/07/java-creating-jdbc-connection-to.html[^]
22 Oct 2012 by suraty
HelloI installed SQL Server 2008 R2 and Visual Studio 2010 in my win7 32 bit. They were installed correctly. And each works well alone. But when I want to connect to SQL Server Management Studio from visual Studio I get this error:SQLException was unhandled A network-related or...
22 Oct 2012 by govardhan4u
try to have a connection using "Server Explorer" and check if able to connect. If fine just copy the connection string from there
27 Oct 2012 by m.babri
I want to test my yahoo mail with a password to connect - but i don't want to send a mail. I only want to type my user and password and C# application tell me it is a correct password or not.
27 Oct 2012 by OriginalGriff
Just send an email - it is the safest way of testing. Or are you reluctant to send an email because it is not your account, and you are trying to crack someone's password? :laugh:
3 Nov 2012 by _Natula
Please point me to the resource that help me to study visual studio 2010 database data modeling.Thank you.
10 Nov 2012 by Member 9366327
I have been searching the internet for weeks now.Is there a way I can connect to a network/router/access point through VB.NET?I don't really care if the program needs administrative privileges.I have already made a program which lists the access points in range.The purpose of my program...
10 Nov 2012 by Dave Kreskowiak
You're not really writing a program to get a list of SSIDs and connect to them. If that was the case, you'd be using the Wireless Network API.You're writing a program to ask another program what the list of SSIDs are.Well, you can use the same technique to net NETSH to connect to...
16 Nov 2012 by MitchG92_24
Hi All, I've tried researching this but can't find anything black and white, and this sites always been helpful.I have an object called "EventLog" that i need to pass into an existing SQL database as a row, this database has a stored procedure named "CreateNewEventEntry".Server name...
3 Dec 2012 by Deenuji
i wanna send one file through ip address i got error like this No connection could be made because the target machine actively refused it 192.168.1.20:80Below coding i written in this program....this is program error or it's related to firewall proble....but in my system i disable the...
7 Dec 2012 by Dustin Prevatt
I have a windows form that connects to SQL just fine on about 5/10 PC's but on the other pc's i get the following error:System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found...
7 Dec 2012 by André Kraak
This technet article How to Troubleshoot Connecting to the SQL Server Database Engine[^] might help you troubleshoot the problem.
17 Dec 2012 by Sarathkumar Nallathamby
Hi all, I need the case for my asp.net project i have to use oracle db.. Currently i am having Vs2008 on my machine & 11g DB.. What are the process is there?? Whether have to install anything?? Or have to change the settings.. Please lead...
17 Dec 2012 by Wendelius
To communicate with the Oracle server, I suggest using ODP.Net[^]. You can download it from that link and install it after that.Also don't forget to read the following links:- .NET DEVELOPMENT WITH ODAC 11.2 RELEASE 4[^]- ODP.NET Tip of the Month Archives[^]- Oracle Data Provider for...
17 Dec 2012 by VishwaKL
This may give you the idea[^]
19 Dec 2012 by P.T.R.K
Hi,Is possible to get transaction from opened connection and assign the transaction to command object?Please see the examples,That is, In GetReader function in DataHelper class, I need to check if connection is starts a database transaction or not. If started then i need the...
29 Dec 2012 by rahkan
the delay is because it's trying to connect to a database that doesn't exist, at least i'm assuming that since you say the connection string is incorrect.
9 Jan 2013 by Gus'O.
I am reading records from a 2010 Excel spreadsheet via my web application using the following connection string on my developer machine which has Window 7 installed (32-bit): ...OleDbConnection conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +...
17 Jan 2013 by sjelen
It's hard to give a solution without knowing your exact network setup.Most common case when connecting through a router is that your local network is behind NAT and it makes direct connection from Internet to local computer impossible.Solution depends on your router capabilities: you would...
17 Jan 2013 by animares
I just want to use socket to connect to a remote computer and send the message (TCP chat). What do you suggest? Port forwarding or put the computer in DMZ zone?
29 Jan 2013 by mistergamer
there is a solution but it is not completly operating. Create a dll ActiveX by following these steps with "InTheHand.Net.Personal.dll" :Start VS2010 as administrator.Open a class library project (exmaple - MyProject).- Add a new interface to the project (see example below).- Add a using...
29 Jan 2013 by mistergamer
there is my dll code to connect:using System;using System.Collections.Generic;using System.Linq;using System.Text;using InTheHand.Net.Sockets;using InTheHand.Net.Bluetooth;using System.Windows.Forms;using InTheHand.Net;using System.Runtime.InteropServices;namespace...
4 Feb 2013 by Pascal-78
In your Server code, you are writing your answer to the socket itself.You have two choices:1. display the message on the server usingSystem.out.println("Hello " + inputLine + " from Gary");2. read the answer on the client and display it in a widget of your Activity.You have to check...
15 Feb 2013 by Sergey Alexandrovich Kryukov
If some lock statement on the same object is used only in one place of the code, it is functionally equivalent to the situation when no lock is used. Isn't this obvious?Locks implement mutial exclusion mechanism which works for only for identical lock object. If two or more blocks of code...
15 Feb 2013 by Ms. Uay
hi everyone.. im new here and i need a step by step instruction on how i can connect MS Excel file to Visual Basic 2005 Express.. connecting and viewing it in datagridview.. please help me.. please.. :(
4 Mar 2013 by dheerubhadoria
I want to connect my android phone with my PC how it can be possible,if anybody have solution please post.
4 Mar 2013 by bbirajdar
You will need a USB cable. You can connect a Android phone to PC with USB cable and it will be recognised as a USB driveCheck these...
19 Mar 2013 by Chung Thanh Nguyen
Can anyone tell me download multi connection mechanism of IDM?How it downloads to temporary files and join them.how to download a file from internet[^] I using this code to create a program to download one file with 8 connection. I create one connection to download some MB (I divide MB for...
19 Mar 2013 by Steve44
Your loop termination condition is wrong:if(fileLength == actualBytes) break;should beif(fileLength == bytesCounter) break;Apart from this, there could be different reasons, e.g. start and end of different connections could overlap or not match in different ways, your...
23 Mar 2013 by OriginalGriff
The first thing you need to learn is that MD5 is not an encryption algorithm.It is a Hashing algorithm. The difference is that encryption can be reversed - Hashing cannot.Hashing is destructive - it throws away information to generate a small, fast code which can be used to verify data,...
30 Mar 2013 by Member 9953668
We are developing android application that is connected to a .NET middleware application with WCF restful services and middleware connects to different kind of database.Our transaction returns records after 1 min, when we use 3G or WIFI connection, everything is fine.But when we use...
30 Apr 2013 by Sumodh Krishna
I have to load data from a remote mysql database for my app. The table contains event id, event name and event details. I have to get the last data from the table and show it in 3 text views. I tried a tutorial from androidhive. But it doesn't seem to work. please help.class to retrieve...
3 May 2013 by Sumodh Krishna
just add in oncreate the following codeStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads().detectDiskWrites().detectNetwork() // StrictMode is most commonly used to catch accidental disk or network access on the application's main thread ...
16 May 2013 by Member 10058787
Hi CodeProject,Can you please give me a Hello World code for connecting an application over wifi between laptop & android.The code says Hi from laptop and gets a reply hello from android or another laptop over wifi.Can be as small as possible.But surely needs basic concepts of...
16 May 2013 by Prasad Khandekar
Hello,Have a look at this[^] sample.Regards,
20 May 2013 by Usha Muhunthan
I need to connect my system to client PC, I have teamviewer but its commercial use, i need a open source. Can anyone suggest Thanks in advance
20 May 2013 by sasi dhar
dont install team viewer,just run it.it ll be helpful.
3 Jun 2013 by Sergey Alexandrovich Kryukov
Please see my comment to the question. If this is ASP.NET, why not? Of course it would be quite possible. Short answer is: use ADO.NET. This is a very nice introductory article which can help you to get started quickly: Using ADO.NET for beginners[^].If PHP, also, why not? But this would be...
24 Jun 2013 by Julio Zuart
Hello everyone! This is my first question ever so I hope I do everything correctly. Please feel free to provide feedback on how to use the community website since I'm eager to learn.I am about to complete an application that runs different databases, 2 locals within the client computer, and...
24 Jun 2013 by MitchG92_24
Hi All,I have a c# web service that is goign to be used by different machines during a build process. How can i ensure that only one connection is made to the web service at any one time? I remember using mutex's but im sure that only ensure one instance of a process is running on a single...
24 Jun 2013 by Ahmed Bensaid
You should use locking like in these answers :How to limit HttpModule with ONLY ONE call per request?[^]How to restrict to one method call at a time?[^]
1 Jul 2013 by Rick Sanford
Hey all,I think my request is simple, but I have done some research out there and nothing seems to be answering it for me other than very ugly solutions to my problem.I have a hosted MySQL database with a hosting company in which I am a reseller of there service. This means I have more...
1 Jul 2013 by Ron Beyer
SSH.NET Library[^]SharpSSH2[^]
3 Jul 2013 by LordVovin
Hi everyone!,I'm trying to create a project, so that I will have the opportunity to refill the table on SQL server. The table is created and it has several columns. I searched the internet, but did not come across to the the solution I'm looking for. Maybe, I will explain first what would my...
3 Jul 2013 by John M Bundy
Not sure I am following exactly, but is sounds like you are just trying to get the lines of a multi-line textbox and store them.For Each Str As String In Me.TextBox2.Lines MsgBox(Str) NextIf you have country in say textbox1 then you can useFor Each Str As String In...
8 Jul 2013 by LordVovin
Hi all,I have problem with my sql connection, or sql port. I would like to connect with my VB.net application to sql database placed on my server (external machine). Normally, when I'm connected to normal net - everything works great. But when I'm trying to connect with the application to...
11 Jul 2013 by Manu V Nath
Please refer this it amy help you[^]
19 Jul 2013 by MikeTheDebugger
I am working on an application that uses Silverlight. The issue is based around the update process.The update uses delegates (via InvokeAsync) which place calls to a web service.It will call BeginInvoke X number of times and THEN when EndInvoke is called we find out if they failed or...
22 Jul 2013 by MikeTheDebugger
I took the event handler out and I'm sure I've tried that before. It's still not working right now. I got 700+ entries in Fiddler this time but, due to randomness of success, this could be less if I run this later on in the day. I've posted the original code and what I've done to...
23 Jul 2013 by MikeTheDebugger
I don't know if this is really "proper" but your explanation of events helped me come up with this "bandaid." It seems to work! I just successfully updated 2317 records. I watched them all go through Fiddler and then queried the database to confirm. If you have any ideas for improving this let...
1 Aug 2013 by Mr.thang
Hi All!I want to read/write excel file using C #. But I can not connect to Office 2013Here is my connection string:OleDbConnection oledbConn;oledbConn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties='Excel...
16 Aug 2013 by bhawin parkeria
string^ constring=L"datasource=localhost;port:80;username=root;password='';";MySqlConnection^ conDatabase=gcnew MySqlConnection(constring);MySqlCommand^ cmd=gcnew MySqlCommand("select * from eventor.user",conDatabase);MySqlDataReader^...
19 Sep 2013 by Member 10285850
Would you please help? I put connection string in my web.configMy web.config: connectionString="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=mywork-PC;Initial Catalog=homework;Data Source=myDB"/> in my source...
19 Sep 2013 by Angel Gunther
I would try putting brackets or single quotes around the userid in the connectionstring, Since it has that dash.
19 Sep 2013 by codestar007
string connStr = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;Try like this..
19 Sep 2013 by ♥…ЯҠ…♥
Hi, I think the connection string name you have given as different in web.configConnection string in your web.config should look like this....Otherwise change the name of the connection string that matches the string that you have gave in server side code(mywork_str).I hope this...
20 Sep 2013 by Member 10285850
Thanks you all.I have replaced ["mywork_str"] === > ("mywork_str") and it is working...
20 Sep 2013 by mkaatr2
Hi there...After building a webservice, and deploying it to a server, randomly I am encountering the following error:"the underlying connection was closed: a connection that was expected to be kept alive was closed by the server" After searching the internet, I found that many would...
24 Sep 2013 by adat7378
I have used several context within one class. I have not used any global context. I need each of my context to stay open as I am doing multiple queries and saving more than once in the same method before disposing the context. Initially I declared as belowcontext = new...
25 Sep 2013 by Member 9507975
instead of using you context like thiscontext = new Entities();multiple queries..save..query...context.Dispose();use like this using ( var context = new Entites()){ //starting here connection opensmultiple queries..save..query...} // before this bracket the...
10 Oct 2013 by Banci Gurjar
Hello All,Here is the description of the case i am stugging on:I have an application developed using .net C# and uses attached Db file with it without any SQL server in its App_Data folder named as Database1.mdf and Database1.ldf, i can successfully connect with my local application, but i...
11 Oct 2013 by ASP.NET Community
The connection string specifies information about how to initialize a connection to a data store.It contains keyword/value pairs. the first pair is
11 Oct 2013 by ASP.NET Community
Hello All,Here I am posting code, which will read through a Excel Document. This code will traverse through all sheets of Excel spread sheet, No
28 Oct 2013 by thanh_bkhn
When you assign your values into cells, you should check if these cells have values or not.For example, if you want to append values vertically: A6, A7, then A8, A9, and the 3rd time is A10, 11,you can use this:currentRow = 6currentVal = XlSheet.Range("A" & currentRow).valueWhile...
29 Oct 2013 by niko_tells
hey there,i have coded a wcf service hosting on IIS. Its a basic chat-programm. Now my problem is, that i can open this application multiple times on my pc, so logicaly i can chat with the clients running on IIS. But how can i solve the problem that another user is running my app and can...