VS 2010 SQL Server Connections
Aug 24, 2011
I'm pretty new to VB.NET and connecting to SQL Server.What is considered best practice when building an app that needs to connect frequently to a SQL Server DB to fetch, write, delete and update records?Should a connection be opened at app startup (a connection at start is opened to validate the user) and left open for subsequent transactions or should a connection be opened, closed and disposed of each time a read/write to the DB is required?
View 3 Replies
ADVERTISEMENT
Jul 19, 2011
Using VB.Net and SQL Server 2008 R2: I have recently had a database that using sp_who2 reflects a connection ".Net SqlClient Data Provider" is still active even though the .Net application has closed and disposed of all connections.
[Code]...
View 1 Replies
Jul 25, 2010
I have a server which has around 300+ users on it. Though the problem is that its coded in VB6, and if somebody has a bad ping, everybody has a bad ping. I need a tunneling server which will tunnel the incoming and outgoing connections and make there ping appear to be 0 in the server. Client to Server, Server to Client.
View 1 Replies
Mar 11, 2011
I searched on google for these terms : "How to see all open connections in vb.net" and it should be for a server im running and it would be like to see witch users are connected (ip) and then if i type in the console -disconnect ip then the user will be disconnected from the server but is this technical posibble ?
View 4 Replies
Feb 7, 2012
I am currently working on an asp.net web page with a GridView displaying a table from a database.This GridView has 4 DropDownLists that will be used to filter the data shown on the GridView. When the page loads 4 Sub routines are run, each one connecting to the database with a select statement to fill the DropDownList with relevant filter headings.
Initially, I had one connection with a loop that populated all of the drop downs but these contained duplicates. I then split the filling of each DDL so that the select statements could contain DISTINCT. I would like (and am sure there is a way here) to be able to populate all of the DDLs with data from one connection.
Code for one connection:
Protected Sub FillDepDDL()
Dim conn As New SqlConnection()
conn.ConnectionString =
[code]....
The other 3 column names: FirstName > DDLFN, LastName > DDLLN, Wage > DDLWag.This is only a test DB and the princibles learned here will be applied to a larger live project.
View 1 Replies
Aug 27, 2009
I have a java class that is used to for ssl connections to a web server. I have got some of it converted however there are serveral java libraries that i have been unable to figure out how to call or reference in vb.net. First off i'm not even sure if it's possible to reference them
[Code]...
View 1 Replies
Aug 17, 2010
I have a .net window application created and I wanted to see if it's at all possible to place various file dependencies off the web server. e.g. is it possible to have the connection to the database be off a web server?
I also would like to see if it's possible to place one of the .dlls off the web and have code that points to it to load.
View 2 Replies
May 29, 2009
In our VB 2008 we are making a lot of connections to sql server 2005 databases. Is there a possibillity to check with a program or a tool of 2005, all connections are closed?
View 3 Replies
Jul 27, 2009
Every time I execute my application and the app try to access the database I received an error message telling me that the user cannot login into the database. This is because the VS Server Explorer have the connection opened. What I need is that every time I debug (F5) my app the Server Explorer close the connection with the database so I do not have to stop the execution and manually close the connection. Is this is possible? Is there any way I can setup the debug or the Server Explorer to do this?
[Code]...
View 1 Replies
May 17, 2010
I am developing project on cyber cafe using vb .net 2005 and winsock i don't know how to accept connections from multiple clients to a server having winsock control
View 2 Replies
Sep 2, 2009
a small question: what is the difference between sync and async connections in a tcp/ip client/server application?
View 1 Replies
Dec 18, 2009
I have been developing an async socket connection server and client program. I have been testing it, and noticed that if I connect to the server from my client and then disconnect. Upon reconnecting I am on a different port(local IP still). This is fine, however when I go to send a message, and the server trys to update all the clients, it eventually hits clients that do not exist anymore. I get the SocketException 10054, and upon connecting/disconnecting enough, it no longer works at all. My question is how do I clear out these no longer useful sockets from the server? I am doing currentsocket.Shutdown(SocketShutDown.Both); and then a currentsocket.Close(); after that. When a user disconnects.
[Code]...
View 1 Replies
Jun 11, 2009
I have an application which connects to a database, retrieves a username from a user's table and matches it against the username retrieved with System.Security.Principal.WindowsIdentity.GetCurrent.Name.On my localhost, everything works fine. The database exists on the development server but the application lies on my localhost. All of my authorization and authentication techniques are running smoothly.However, when I publish my application to the development server, I'm faced with the following error.Cannot open database requested in login 'databaseName'. Login fails.Login failed for user 'DevelopmentServerNameASPNET'.
[Code]...
View 4 Replies
Apr 27, 2011
In my application, users can establish connections to one or more databases in order to pull in data, thus a read-only connection is sufficient. I use the following connection string syntax when connecting to an Excel 2010 database:
[Code]...
View 1 Replies
Nov 8, 2011
On a lan, the server and multiple clients work correctly.but over the internet, the server and client can't hear each other(we tried several different host computers, and several different hardware configurations)Is there a secret to getting UDP to do connections over The Internet vs a LAN?
View 9 Replies
Nov 11, 2011
I have written a program that uses directshowlib to capture a stream from a webcam and save as an AVI whenever a bird lands on the experiment platform for behavioral research. What I would like is to be able to allow another program or connection to the same webcam at the same time simply for preview purposes, is this possible?
Basically I want my app to still be able to record on demand when a bird interacts but I would also like a IP cam program like webcamXP/Webcam7 to be able to stream a live feed to the internet so we can have a live view of the platform. I had found some articles about connecting multiple streams from one webcam but am not sure how to go about it. If I have to I will simply mount a 2nd cam in the Bird colony and dedicate it to the web stream but if I can use the same cam as the recording cam that would be great.
View 2 Replies
Sep 30, 2009
I have a little Windows Form application that uses sql database.My application works on my computer, but when I install the app to another computer I get this errorSystem.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was noccessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
View 21 Replies
Jun 16, 2010
Can anyone provide a script to close all open sessions in a Terminal Server?
Aldo.Everything is possible, impossible just takes longer
View 2 Replies
Jun 27, 2011
Hey guys, I am trying to send data from client to server (encrypted) and the string sent from the client is not the same as recieved from the server. I've been killing my brain for hours to get this to work but I cant manage. Im converting everything to Base64 string.
Client:
Public Sub SendMessage(ByVal msg As String)
Try
SyncLock myclient.GetStream
sw = New IO.StreamWriter(myclient.GetStream)
[code]....
View 4 Replies
Apr 20, 2012
With a Windows form that I would like to be a DDE server. I know that DDE is not natively supported in VS 2010/11 so I'm using the NDde.dll to add DDE functionality to this program.
Objective: Create a windows form to act as a Pop-up notification that has a textbox field. This textbox field must be selectable in order for users to copy a text string to the clipboard and paste into another program that does not support DDE.
Overview: A phone system has an on-screen agent program that triggers a pop-up form, the DDE Server, when an incomming call is presented. When the agent accepts the call the agent program, acting as a DDE Client, registers a DDE session, Application=phnserver and Topic=callerid. Then communicates an "OnExecute" command to the DDE Server followed by a number string. This string should be presented on the pop-up form in a text box. Once the call is completed the agent application will issue a command to close the pop-up form.
Below is my current code.
CODE:
View 2 Replies
Dec 5, 2010
posted again but this time its regarding both the webclient and the web reuqest giving me this error :S
View 1 Replies
Jun 6, 2010
I'm populating a listview with a list of databases on a selected SQL instance, then retrieving a value from each database (It's internal product version, column doesn't always exist) I'm calling the below function to populate the second column of the listview:
[Code]...
View 2 Replies
Feb 23, 2011
I'm trying to understand how to handle db connections in a multi-theaded windows program.It I have this simple class:
public class MyClass
private myConn as new sqlconnection
private MyThreadPool(5) as Thread
[code]....
View 10 Replies
May 24, 2012
I searched araound and having some difficulties in implementing one scenario with SQL Server 2000 and sybase.I have two SQL servers on different locations naming ServerA (MSSQL Server) and ServerB (Sybase server).I have a table called SALARY.Whenever I insert one record to customer SALARY in ServerA, I also will insert it into ServerB.If should any of them failed, both of them should be rolled back.I am using Asp .Net with VB for the programming.I do not have the right to change / add table in Server B. The only thing allowed in Server B is insert/delete/update record.I looked around and find a method to use TransactionScope but I am not quite sure it is the right way to do.url...
View 1 Replies
Dec 17, 2010
I am developing an Application that uses TCP To listen for connections, and then when a message is sent to the server and then it alerts the IP that is running the server. (Lets say the server is on a iPhone, and some how the iPhone gets a text message, which alerts a tcp server running in the background via a .jar, it would send the owner of the iPhone a message on the computer telling it it has a text. This is just an example though, but I think it gets the general idea across. I've been trying to do this, and I can connect to a TCP Server (using 127.0.0.1:8888 for testing purposes, will move to a solid IP and Port later). I can start the server (its still buggy and under development) but i don't know how to connect to the server via an application, and when a certain message is received to alert the IP Running the server.
My Server Code is:
Dim serverSocket As New TcpListener(8888)
Dim clientSocket As TcpClient
Dim infiniteCounter As Integer
Dim counter As Integer
serverSocket.Start()
[Code] .....
Now I know that to connect you'd do something like
Code:
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim serverStream As NetworkStream
clientSocket.Connect("127.0.0.1", 8888)
serverStream = clientSocket.GetStream()
And I know I would have to use some sort of Byte() method to send/receive messages, but I am at a loss on how to set it all up.
View 3 Replies
Apr 22, 2010
I need to download a bunch of pages from a web server, ie. spidering. I know that servers are typically configured to only allow a couple of concurrent connections from a given IP, but that would already halve the total time to run the script instead of downloading one page at a time.
View 4 Replies
Jul 28, 2009
i've been previously using Visual Studios built in wizards for manipulating data access to and from an MSAccess Database, however just recently i coded my own classes and connections to the database, ive been able to select, update and delete records effectively however my problem comes with inserting records.
I have a 3 tiered table database:Tbl_PO, Tbl_Parts, Tbl_Shipments each po has multiple parts, each part has multiple shipments.when i insert a record into the tbl_PO, i need to retrieve the ID used on that insertion.
View 4 Replies
Feb 15, 2012
I am using two SQL connections in my Program. I declare them like this:
Public SQLcon As New SqlConnection("server=(local);database=master;Trusted_Connection=True;")
[code].....
View 5 Replies
Feb 20, 2010
How do I go about closing a connection if I redirect before I can close it? Does it close when the new page loads? For example:
[code].....
View 3 Replies
Aug 14, 2009
This thread (Question) is a continuation of a question answered by JohnWein. the original question asked by me in this thread:http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/4d9b44a0-91ed-4f64-a3a2-74afffce2256 an this is the answer:
[Code]...
The question is, in the case of four connections, how can I make sure that all points are connected with minimum number of connections using the same above code?
View 1 Replies