Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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

Reply With Quote
  #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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:08 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.