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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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
     
    Iron Speed
     
    ADVERTISEMENT

    Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!

    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

    - Movement and Player Statistics in a VB.NET T...
    - Creating and Drawing a Game Map in VB.NET
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...

    Iron Speed




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway