Visual Basic.NET
  Home arrow Visual Basic.NET arrow Bridging the Gap: Talking to MySQL From VB...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Bridging the Gap: Talking to MySQL From VB.NET Through PHP and XML
By: Nicholas Clayton
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 33
    2004-02-04

    Table of Contents:
  • Bridging the Gap: Talking to MySQL From VB.NET Through PHP and XML
  • An Adventure in VB.NET
  • PHP: Talking the Universal Language
  • What's Said and Done in the End

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Bridging the Gap: Talking to MySQL From VB.NET Through PHP and XML


    (Page 1 of 4 )

    This month's Developer Shed Writing Contest Winner, Nicholas Clayton, explains how he was able to use VB.NET, PHP, and XML to talk to a troublesome MySQL database. "There may be times when what your client needs and what their web host will give you brings your project to a grinding halt. I have encountered such a problem recently when trying to access a client’s hosted MySQL Database from an app I have written in VB.NET."

    No matter what I did, the server would not let me in. I had tried connecting from my web site first, but that was a no go. So I decided to break out a VB.NET app to see if that would do the trick. Well, it does, but not the way I was hoping for. I have finally finished a workaround for this security nightmare that I have had for the past couple of weeks.

    I had tried talking to the hosting company but kept getting very general, very basic answers that really did not have anything to do with what I was trying to accomplish. So after banging my head on the desk and scouring Google like a madman, I decided to take matters into my own hands and learn a few new tricks while I was at it.

    First, I will explain the big picture and then break it down into the individual pieces.

    The Big Picture

    I’ve created a small front-end in VB.NET to display a DataGrid showing messages saved in the client’s MySQL database. I cannot connect through MyODBC thanks to the wonderfully secure hosting environment, so I came up with another way…XML generated by PHP.  Don’t ask me how I came up with this, it was a late night enlightenment.

    In order to limit who or what could access this information, I created a key value to pass along with the rest of my post data. Once this data has been posted, I get back a string of XML with the data I need for the DataGrid. This is similar to the actions that occur when communicating with a Web Service.

    Simple enough, right?

    First, I’ll start with the front-end.

    More Visual Basic.NET Articles
    More By Nicholas Clayton


     

    VISUAL BASIC.NET ARTICLES

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT