Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
| Search | Today's Posts | Mark Forums Read
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 13th, 2004, 03:56 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default no usr tables VB 6/ XP Pro, SQL 2000/Sml Bz 2003

This is pretty weird......

I have a program, developed in VB6.0. Pretty simple realy, just connects to SQL Server 2000 running on Small Biz Server 2003. Using SQLOLE connection string as follows:

    cnWITS.Open "Provider=SQLOLEDB;" & _
           "Data Source=" & strServer & ";" & _
           "Initial Catalog=" & strDatabase & ";" & _
           "User Id=" & strUserID & ";" & _
           "Password=" & strPassword & ";Persist Security Info=False"

User Id is set to sa in this case so should have full permissions.

Connection works fine, no problems at all. I am then executing the following SQL statement:

    Set rsWITS = cnWITS.Execute("SELECT NYEAR FROM TableYear WHERE CYEAR = '" & Mid$(pstrCustNum, 2, 1) & "'")

Comes back everytime and tells me that the table TableYear can't be found. I know that the table is there as I have seen it... LOL.... and I ran exactly the same query from Query Analyzer on same machine to same server. I can change the SQL statement to the following:

"Select * From sysobjects" and it creates the recordset just fine. Tried this just to see if it would find system tables. And, it does.

Now the realy weird part..... I developed on a stand alone PC. XP Pro, VB 6.0, SQL Server 2000, all local. Had the same problem but found one reference on the internet saying similar problem fixed by resetting SQL Server sa password. Sure enough, I reset password to same as it was and it fixed the problem. It does not, however correct the problem in the server/clinet environment.

Bottom line: Connection works, can't see user tables, can see system tables fine.

ARGH!!!!!! :(

Anyone have any idea on this??? Any help appreciated......

Thanks Folks,

Rick

  #2 (permalink)  
Old December 14th, 2004, 02:50 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oh well, sorry for wasting everyone's time with this.

I did what I guess was the obvious and converted the project to VB.NET/ADO.NET. Now everything runs fine.

Thanks anyway,
Rick



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 on Windows XP SP2 -- HELP ASAP reyboy SQL Server 2000 0 August 7th, 2005 02:10 AM
SQL server 2000 developer Edition on XP Pro sevdon SQL Server 2000 1 January 6th, 2005 11:52 PM
How to install SQL 2000 on WIN XP ? rajansingh SQL Server 2000 1 September 23rd, 2004 10:24 PM
installing sql 2000 onto win xp pro carl148 SQL Server 2000 1 September 1st, 2004 08:42 PM
Migrate Access XP to SQL Server 2000 Walden Access 1 September 21st, 2003 01:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.