Trap A Connection String That Is Disconnected?
Sep 11, 2009How do i trap a connection string that is disconnected?
View 5 RepliesHow do i trap a connection string that is disconnected?
View 5 RepliesHow do I assign a My.Settings.Item connection string to cmd.Connection connection string value?
Dim cmd As New SqlCommand()
cmd.Connection = My.Settings.Item("csStaffHoursWorked")
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "spSaveDeltekImport"
I got this Error Message while I try to preview the records in Dataset Designer:"The connection string could not be found or Data provider associated with the connection string could not be loaded"
Here is my dataset.xsd code
<Connections>
<Connection AppSettingsObjectName="MySettings" AppSettingsPropertyName="loginConnectionString1" IsAppSettingsProperty="true" Modifier="Assembly" Name="loginConnectionString1 (MySettings)"
[code]....
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.
I understand the possibilities for encrypting a connection string in .net v4. I have a win forms application that will be used by multiple people on different machines. I understand that I need to protect the connection string at time of the app being first run on the target machine. However I am concerned that for a period of time my connection string will be unencrypted. I am looking for advice in how to deploy my app with the connection string already encrypted or encrypted during installation. encrypting the connection string in a secure way?
View 1 RepliesI'm developing an app in vb.net (visual studio 2008). I have a Teradata back-end that will be supporting multiple users in a production environment. I need to use variables in the connection string as the user/pass will be changed every 3 months.
For the gist of the application:
In it's most basic form - I have a search form which works correctly - it pulls results into a listbox and the user then double clicks the list box which will then open a form that is bound via table adapter to the back-end table (Teradata). My connection string is fine everywhere in the application. My problem is using a modified connection string for the "fill" function of the table adapter once the form is opened.
I'm using the code below for the on-load event and keep getting an "invalid connection string" - again, the connection string works fine everywhere else in the app, and the variables etc... are working correctly.
Private Sub adaptertest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DBConnStr As String = "Provider=TDOLEDB;Data Source=TDDEV;Persist Security
[Code].....
I'm facing a problem after installation any software setup that has a database in access(mdb file) How to I transfer file path in our connection string.
View 3 RepliesI am trying to connect DSN from my VB 2008 project. When i try using myoledb.connectionstring="DSN=myDNSname" I get the following error message An OLEDB provider was not specified in the connectionstring.
View 1 RepliesWhy doesn't an exception get thrown when this function is called when there is no ConnectionString set for the Connection? I just spent 15 minutes debugging and staring at it and finally figured out it needed the connection string. Shouldn't an exception get thrown?
Friend Function GetValues(ByVal TableName As String, ByVal FieldName As String) As DataTable
Dim cn As New SqlConnection
Dim cmd As New SqlCommand[code].....
I just read a book : Pro ADO.NET 2.0.It discuss about the disconnected and connected feature of the ADO.NET.In disconnected, the "data container" is DataSet.But it doesn't say anything about the data container if i use the connected feature. In ADO, we have recordset, what about ADO.NET.
View 3 Repliesin the begining i cold the database (accdb 2007) (AGC)and the table(telp)
in form declaration
Dim cn As New OleDb.OleDbConnection Dim cmd As New OleDb.OleDbCommand Dim ad As New OleDb.OleDbDataAdapter Dim cmdb As New OleDbCommandBuilder Dim dbs As New DataSet
[code].....
Is there any way to run code when COM object is about to be disconnected from RCW without implementing IDisposale interface and explicit call MyObject.Dispose in client code?
The code below is not working. When program enters Finalize sub, ExcelApplication is already disconnected from RCW, and I get error. I understand why it happens, but I want to get a solution.
I want to make it working the following way: when last managed reference is released, code from Finalize sub is executed before COM object is disconnected.
My question is - is it possible at all and if it is then how can I handle this event inside the class, without need to call Finalize explicitly from outside?
Very simple class:
Public Class ExcelRunner
Dim ExcelApplication As Excel.Application
Public Sub New()
[Code]....
what is a disconnected architecture in dot net?Why are the dataSets a disconnected architectures in dot net?
View 15 RepliesI am using the following code to receive data in a seprate thread
[code]...
Now if my client shuts down elegantly then my application knows that the client has disconnected but if my client is removed from the network or any other issue occurs them my application does not appear o know that the client disconnected why is this ??
i am using the client/server classes for file transfer by moeur.what i want to know is that once my client is connected to the server and after that the client machine goes off the network. now when my server trys to send a file or some message to the client i am not able to trap the error that the client is disconnected.how to do this. there might be a case where the client machine suddenly shuts down. in such cases how will my server know that the client has disconnected.
View 2 RepliesI shipped a VB .NET app to my customer. They installed the app in program files folder. The app starts and everything works ok. Now my customer reports that some intranet TCP/IP connections are interrupted after starting the app. Sometimes they are not available after starting my app, sometimes the intranet connections are still available after my app has been started. After my app has been started, there are connection error messages to their intranet services. After re-starting the machine, they still can't connect to the intranet services. A fix is to login with another user name or re-load the profile from the server after they have been logged in on another machine.
Do you have any ideas where to start further investigations? Is it possible that my .NET app interrupts or blocks intranet connections? Could you recommend any trace tool that gives me a hint when and why the intranet connections are blocked? Why could it work for them after they login on another machine?I am wondering if my .NET app could disable the intranet connections. Do you have any recommendation for testing that?
code to access SQL Server database in connected and disconnected mode through ADO .Net.
View 4 RepliesI'm using an OLEDB connection to a Sybase database, with ADODB.dll file version 7.10.6070.0 (which comes from the Sybase 12.5 package). I need to be able to open a connection, use a command object to fill a recordset from a stored procedure, then close the connection and pass back a disconnected recordset. My attempts so far fail as every time I close the connection, my recordset also closes (which means it is not disconnected).
Is there a property I must set somewhere to indicate that the recordset should be disconnected? I cannot set Recordset.ActiveConnection = False because I get an exception ("Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source."). I do set the Command.ActiveConnection = False, but that doesn't stop the recordset from closing as soon as I close the connection object.[code]...
'pressing F1 key on main form. I dont know how to trap whether user pressed F1 key or not
Private Sub frmMain_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Dim KeyAscii As Long = Asc(e.KeyChar)
[code]....
I'm using Vs2008 and I have a combox in a Windows form.I woud like to know how I can capture the tab key after the user has select an item in the combobox.
View 12 RepliesI have two website application,
first Application is located at:
MyApp/WebApp1
and the second at:
MyApp/WebApp2
is it possible WebApp2 get a Connection String from WebApp1 web.config?
Can you have a SQL database on a ftp server and connect to it from a windows application?
View 2 RepliesThe fileupload control works well for files < 4MB (maxrequestlength), but if the file is larger than this the program fails with: - Server error in '/xxxxx' application Maximum request length exceededHow do I trap this so that I can return a better error message? The failure occurs before the Page Load from any callback, so I can't see any way of trapping the error, and I haven't seen any event or property of the Fileupload control that I can set to say "Do this when Max Request Length is exceeded"
View 16 RepliesDoes anyone know how to trap f.i. the SelectedIndexChanged event in order to read the SelectedValue from the ComboBoxColumn?
View 8 RepliesWith the component I am using, I only have a keypress event. So I cannot seem to figure out how to trap the control key. The lower case z is reported as keyascii 90 and the upper Z is 122 but can't get the control to show me when debugging. This is where I'm at (trying different ways, none working) Can someone tell me how to trap a ctrl-z correctly with this keypressevent?
[Code]...
I have the problem in VBA for Access, but I assume that it is related to Visual Basic as a whole as well.
[Code]...
I have the problem in VBA for Access, but I assume that it is related to Visual Basic as a whole as well.I have the following code:
public sub NavigateIE
dim ieobj as shdocvw.internetexplorer
ieob.navigate ("Some URL")
end sub
[code]....
How can I link the DocumentComplete event of ieobj to the subroutine named customeventforieobj?
Are there any way to trap key when the DateTimePicker is dropdowned?
I have tryed many ways but no effect.
After using the following code, no errors are shown, but my database is not updated once i have made a change using my management system application.
Dim constring As String = Application.StartupPath.ToString() + "mydatabaseName.mdf"
Public c As String = "Data Source=.SQLEXPRESS;AttachDbFilename=" + constring + ";Integrated Security=True;User Instance=True"
Sub openConnection()
conn.ConnectionString = c
conn.Open()
End Sub
DB="Source={SQL Server};Server=CALVINRUKA-PCSQLCALVIN;DataSource=DWDSCalTables;Uid=sa;PWD=;Trusted-Connection=Yes;"
I using SQL Server 2008 R2 to connect with HTML page. I trying to connect HTML page with login to SQL Database. I have try called the Source but didnt work.