Reusing MySqlConnection.serverString?

Jun 20, 2012

Say I have a connection to a database. After reading some stuff I want to connect to the same database. So I naturally use the first database mysqlconnection.serverstring the password and username is not included in connect1.ConnectionString. So how can I do so? Is this by design?

[Code]...

View 3 Replies


ADVERTISEMENT

Difference Beetwen - Dim Connection As MySqlConnection - Dim Connection As MySqlConnection()

May 3, 2010

...this:

Dim Connection As MySqlConnection

and this:

Dim Connection As MySqlConnection()?

View 1 Replies

MySqlConnection.ConnectionString?

Jan 21, 2012

Dim SQLInfo As String = "server=https://lotus.x10hosting.com:2083/frontend/x3/index.html;" _
& "uid=uid;" _
& "pwd=pwd;" _

[code].....

View 7 Replies

Can't Connect To MySql, Using MySqlConnection

Jan 11, 2011

Just got a mySql database up and running (about 3 weeks ago) and it's working fine for web pages with PHP, but wanted to see if I could access it from Visual Basic (why not right). So I downloaded whats needed to get the MySqlConnection working and Been looking around online and nothing is very intuitive as to what the problem is. The error message is:

MySql.Data.MySqlClient.MySqlException: Host '192.168.2.184' is not allowed to connect to this MySQL server

View 2 Replies

Type 'MySqlConnection' Is Not Defined

Dec 19, 2009

I am create a new project in Vb 2008 Express edition. And back end using MYSQL( MYSQL ODBC 5.1 Driver) . Now running is correctly but Build time have a lot of error in this project depending MYSQL connection part. What can I do...? [code]

View 2 Replies

Error MySqlConnection.Open() Unhandled

May 6, 2012

im getting this error MySqlConnection.Open() Unhandled Here is the code i'm using

Imports System.Data.SqlClient
Imports MySql.Data.MySqlClient
Public Class LoginForm1
Dim MySqLConnection As MySqlConnection

[code]....

View 8 Replies

Safe While Using A Thread Pool With A Global Mysqlconnection?

Mar 1, 2011

Im creating a service for a mobile platform and I need to process user messages on a different thread than they were created on to leave the threadpool open.Anyway my App will be using a MySQL database and when it gets a message it will add the message to Another thread pool. But in the sub that procceses the messages I will need to perform query's on the database. So i know i can use a global variable and it will be visible to all threads but is making database operations safe while using a thread pool with a global mysqlconnection?

View 2 Replies

C# - Reusing A Menu With Mvvm And Wpf?

Jun 7, 2011

I was wondering what the best approach is for sharing a menu across all wpf windows/views. My Application doesnt really fit the navigation model, so will probably use a Ribbon control. I am leaning towards creating a user control for the menu and dropping it on each view, but have also seen Josh Smith's msdn article, where he loads user controls.

View 2 Replies

Reusing A Datarow In A Datatable

Jun 7, 2009

I am working in vb2008. Is there a simple way to clone the contents of a datarow in a datatable into a new datarow instance that can be added elsewhere in the table. Can I create a new instance of a datarow and set it equal to an existing datarow?

View 5 Replies

Reusing The Same Varible For A New SQL Command?

Apr 13, 2009

In the code below can I use the cmd for another sql command or do I have to create a new sql command like shown below?

View 2 Replies

Unique ID Reusing Gaps?

Nov 1, 2011

I am upgrading a system that has a Product Table with a Product No Field.This is a string field but most of the existing product Nos are numeric but all over the place.I want to provide a default numeric Product No when the Users are creating a new product record.All I can think of is to use the Identity Field [ProductID] and test to see if it has been used and if so keep incrementing to find the next free numerical, available No.A better solution would be to start at 1 and increment to find the first available but it looks to be several hundred records into the Table. how to find the first available number?

View 9 Replies

Reusing Processes And Disposed Not Firing?

Oct 8, 2010

I'm attempting to run different tasks in there own processes, waiting until each is done while keeping the UI responsive. So far it works exactly how I want it until I try to reuse some of those processes....here is a sample of the

Private WithEvents TaskOneProcess As Process
Private WithEvents TaskTwoProcess As Process
Private WithEvents TaskThreeProcess As Process

[code]....

This is a over simplification of what's going on but it gets the point across. So it works exactly as expected, a button is pressed and the sequence starts. As each task gets disposed it recalls the StartFixing statement which then calls the next one in order until they are all done. BUT when I go to do it a second time the Disposed never fires assuming since it's already disposed. How do I recreate the same named process so it can be reused and still have it fire the disposed event?

View 2 Replies

Reusing Same Controls On Multiple Forms

Mar 22, 2012

I have a set of controls and code behind them that I'd like to reuse on multiple forms. How can I do this? I know of reusing code via modules, but I'm not sure how I can add the same controls and their underlying code. If I achieve this, will changing data on one form affect the values of another form when they're both open? For example...
Cbox1's selected item affects the choices within Cbox2, and Cbox2's selected item affects the choices within Cbox3 (and so on).
So if I do something on Form1's Cbox1 and it changes Form1's Cbox2, will it NOT change Form2's Cbox2?

View 4 Replies

Reusing And Cleaning Up User.config Files?

Nov 11, 2010

Not sure if this has been asked before (couldn't find an answer), but is there a way to reuse a user.config file from a previous version of the application? For example a user.config file is stored in:

C:UsersJohnnyAppDataLocalCompanyApplicationName.exe_Url_wxcnyrmstqy3oj1qwckdjq3gjqkq4fel1.0.0.0user.config After a new version is installed it gets stored in:

C:UsersJohnnyAppDataLocalCompanyApplicationName.exe_Url_wglmejvw01nagu5t1y5yl12chynjomny1.0.0.1user.config The user then has to enter all settings again, even if the new version does not save more settings. An other problem is that although the user.config file is very small, it does get messy after a while when newer versions of the application get installed. Is there a way to clean up the unused user.config files and their folders?

It's the same problem with System.Windows.Forms.Application.LocalUserAppDataPath, that I'd like to use to save other files (containing Listview data), which points to:

C:UsersJohnnyAppDataLocalCompanyApplication1.0.0.0 The Listview data and other files created by the app can't be used anymore.This can be solved by getting the user's appdata folder with Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) and creating a new folder there with the name of the application. But this means there's one folder where the application is installed (user can choose this folder in the installer), one folder to save my own files to and one folder where VB stores the user.config file.

Can something be done about this "mess" or is this just something I have to live with?

View 2 Replies

VS 2008 Saving And Reusing The Size Of A Form

Mar 30, 2010

I save the size of a form to a variable (One Size or two Integer variables--doesn't matter), and then I close the form. Before reopening the form, I set the form size to the size I saved before--which by all accounts of logic and reason should exactly the same. Except, no, it's not. On one system the form "grows" horizontally and vertically by 15 or 16 pixels. On another system the form grows only vertically 15 or 16 pixels. I'd love for someone to explain this perfectly insane, yet MS typical, behavior to me.

[Code]...

View 5 Replies

Reusing A Menu Strip On Another Form Inside Project?

Mar 26, 2010

created a menustrip (MenuStrip1) by dragging the tool onto my form (form1.vb). And designed the headings/items etcI have now created another form (form2.vb) within the same project.I would like to use MenuStrip1 that i designed for form1.vb in my new form2.vb.

View 6 Replies

Reusing Code (functions, Subroutines, Etc.) In Multiple Pages

Dec 28, 2010

I am very familiar with modules from my time with VB and my other programming, but what is the most commonly used practice and the best way to go about this for a website application with ASP.NET? Say I have multiple pages (in multiple directories; some in the root directory, some in child directories from the root) that will call the same set of functions and subroutines, how do I go about putting this reusable code in a place where the pages and their respective classes can call the functions/subroutines?

View 3 Replies

VS 2010 Reusing A Very Specific Project For Multiple Solutions?

Aug 1, 2011

First of all, I wasn't sure whether this was VB.NET or General Developer content... It's not technically about VB.NET code, but it's not very general either since it is specifically about Visual Studio. Feel free to move it if required.A while back I realized that all of my database connection code was getting very biolerplate. had 'developed' my own method of connecting to an Access database and storing the results. Basically, for each table I create one 'Manager' class and one 'Entity' class. The Entity class represents a single record in the database and has properties for each field.

View 9 Replies

Open Excel File And Reusing Existing Excel Instance?

Jul 13, 2010

I have an application the contains several excel files bundled with it. I'm not opening the files and processing them within my application. These files contain a data-connection to reload all of the pivot-tables within each excel file. I have a 'link' on my form, that when clicked, it determines which file to open and calls a sub using filename and executing Process.Start(filename) for any excel file I want to open. I have no problems opening any one of the files and then exiting excel.

The problem is when I 'close' a file, but don't exit Excel; then try to open another file(clicking link on form)... it creates a new instance of Excel.

I know from experimenting that the fileopendialog form will 'reuse' an existing Excel instance, IF it does not already have a file open.

How can I do the same thing without using the fileopendialog?

I don't want the end-user to have access to the folders where these files live. That's why I have multiple 'links' on my form, one for each xls that already exists. I just want them to be able to click on a link and the xls file opens AND if they choose to merely 'close' a file and not exit... Don't create a new instance of Excel, but re-use the existing one.

View 5 Replies

VB2008 With MySQLConnector .net 6.1 - Error "BC30560: "MySqlConnection" Ist Im Namespace "MySql.Data.MySqlClient"

Aug 22, 2009

I have the following code:

[Code]....[Code]....

I get the compiler error message: error BC30560: "MySqlConnection" ist im Namespace "MySql.Data.MySqlClient" nicht eindeutig. in English (I think): "MySqlConnection" is not unique in Namespace "MySql.Data.MySqlClient".

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved