vb 6 odbc sql
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: vb 6 odbc sql

  1. #1
    Join Date
    Jul 2012

    vb 6 odbc sql

    Dim Ssql
    Dim dbstatus 
    Dim rs
    Ssql = " Select * from User_Access A Where A.User_pwd ='1234' "
    set rs = Server.CreateObject("ADODB.RecordSet")
    rs = DB.execute(Ssql,dbstatus) 
    If dbstatus <> 0 Then
    'Error code here
    'code here 
    END IF
    The code is working ok . On successful execution of sql statement the dbstatus value is giving -1 . But according to the code it should return 0 for further execution . For other than 0 it will give Error .

    I'm executing this on sql server 2005 and in windows 7.

    ***But the same code On successful execution of sql statement the dbstatus value is giving 0 on some other enviornment where ODBC version and sql server version is different .

    Can anyone help me out .
    Thanks in advance
    Last edited by WizBang; July 24th, 2012 at 08:46 AM. Reason: Added [code] tags

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Wallisellen (ZH), Switzerland

    Re: vb 6 odbc sql

    What is the DB?
    How do the connection strings look like in these both cases when you get error and when not?
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!

HTML5 Development Center