Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problems connecting VB6 to SQL Server with ADO Control

Problems connecting VB6 to SQL Server with ADO Control

Scheduled Pinned Locked Moved Visual Basic
databasehelpsql-serversysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LaptopBoy311
    wrote on last edited by
    #1

    I've started playing around with connecting a VB 6.0 form to my new SQL server (indeed, I am new to SQL server, as well as it is a new installation) using an ADO control. I've done plenty of connecting to an Access DB with ADO controls and programming, so I figured that trying to connect to SQL was the next logical step. The server installed fine, and the form connected to the server without incident. However, when I ran the form, I had some major issues. When my textboxes lost focus, the inputs were returned to null strings as though nothing had been entered into the control. I have an assignment statement passing the string in the control to a variable in the Lost Focus event, and stepped through the code with the debugger, and this problem is happening before that line of code is being fired. I figure it has to be something wrong with my ADO connection, because as soon as I take the control off the form, the problem goes away. I am using the correct connection string, as far as I know (ie the connection for SQL Server). However...I kinda need to be connected to the database for this to be effective ;) Any thoughts? Please keep in mind I'm used to connecting to Access but kinda guessing and checking with the SQL server, so ANY input will be helpful. THX -------------------- Tim Perry "Remember, comments are there to make people laugh, not to help them fix your code later...because you're code is always perfect"

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups