Results 1 to 20 of 20

Thread: Problem with my code in WIN Xp & WIN 2000

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Problem with my code in WIN Xp & WIN 2000

    I have writtena code that runs perfectly on WIN Xp .. but when I try to run it on WIN 2000 it doesnt ... what might be the problem.....

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Problem with my code in WIN Xp & WIN 2000

    post some code if you want some help

    pete

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    Its a very huge code .. its an application ... Now when I try to run it on a system with WIN 2000 .... it doesnt run at all...

  4. #4
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Problem with my code in WIN Xp & WIN 2000

    Is it showing any error while you try to run the application in win 2000
    ßįňįl

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    It doesnt give any error ... Okay...I'll explain to you what am I try to do...

    I have my program in a system with IP: *.*.*.x which has WIN Xp in it.
    Then I try to go to other PC with an other IP say : *.*.*.y with WIN 2000 loaded on it.

    access the pc "x" on "y" by start --> run --> *.*.*.x
    then go to the shared folder and run the .exe file that I have created...

    I dont get any response at all..

    When I do the same on a system with WIN Xp, it atleast asks me whether I want to "Open" or "Save" in a dialog box....but on WIN 2000 I doesnt even ask me for opening the file at all...

    I have tried this on many pc's with XP & 2000

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Problem with my code in WIN Xp & WIN 2000

    you probably need to write to a log file to find out where it is gettinig a problem

  7. #7
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Problem with my code in WIN Xp & WIN 2000

    That is because there is some .dll files need to run the program.
    The problem is your App is installed in one system and you are trying to acces the .exe file through network.
    I you want to run that program throught network then that machine should have necessary files need to run your program.
    You wiil get the list of .dll and other files while creating setup using "Package and Deployment Wizard"
    ßįňįl

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    How do I write a log file ...I have done it .. can oyu help ... plss

  9. #9
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Problem with my code in WIN Xp & WIN 2000

    To create a log file you need to trap the error. You need to remove "On Error Resume Next" from you code
    ßįňįl

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    yeah....I got the error now when tried again ...
    But its a SQL server error...

    that "SQL server not found"

    I have attached the error pic ...
    Attached Images Attached Images  

  11. #11
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: Problem with my code in WIN Xp & WIN 2000

    post your connection string to database
    ßįňįl

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    But the same is working fine on WIN Xp systems ... anyways here is the connection string

    VB Code:
    1. With con
    2. .ConnectionString = "Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=IBM;Data Source=9.184.63.53,1433"
    3. .Open
    4. End With

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    The IP address is of the system where SQL server is installed....and 1433 is the TCP/IP port

  14. #14
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Problem with my code in WIN Xp & WIN 2000

    Problem 1 - you are connecting as the user SA. This is a huge security risk. Create a separate database user to connect as, and preferably set appropriate permissions for that user (eg: can only read/write the appropriate tables).

    Problem 2 - your SA account doesn't even have a password.. go to bed without any supper!

    Problem 3 - Assuming the database is SQL Server 2000 (or later) you need to install MDAC (link below) for Windows 2000 or earlier machines.

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    I had plans of changing the password and set permissions as soon as my appn is ready....I wanted it to work fine first ... since these changes would not affect seriously ...

    I am building this application to run on several machines ... and it would be a bit tough to install the MDAC on all the systems ....

    If we could have an alternative method for this it would be great...

  16. #16
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Problem with my code in WIN Xp & WIN 2000

    Quote Originally Posted by rupeshkumar_rj
    I had plans of changing the password and set permissions as soon as my appn is ready....I wanted it to work fine first ... since these changes would not affect seriously ...
    I wouldn't bet on that.. I've seen cases where the SA rights are required by apps, simply because this method was used. Not surprisingly after a long re-write, the method was not used again.

    Always develop with the lowest rights required, it will save headaches in the long run (and takes no extra time to do, as you are intending to set those rights later anyway).


    edit: I hope the machine that SQL Server is installed on could not do any damage to your network if a Windows admin was logged in. There are many viruses that use SQL Server in this state to breach Windows security.

    If you care about security at all, SQL Server (or any other system) should have a password set as soon as it is installed.

    I am building this application to run on several machines ... and it would be a bit tough to install the MDAC on all the systems ....

    If we could have an alternative method for this it would be great...
    There is no decent alternative.. to be able to connect you need the drivers, and they are contained within MDAC.

    You could install other things to make it work, but they would all contain MDAC, so what would be the point?
    Last edited by si_the_geek; Jun 24th, 2006 at 08:46 AM.

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    ok...is it possible that we install MDAC along with our application, after performing a check whether the machine has MDAC installed on it or not..

    That would also server the problem ... what do you say .. ?

  18. #18
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Problem with my code in WIN Xp & WIN 2000

    That is definitely possible.. but I don't think you can use P&DW for the setup.

    If you search our Application Deployment forum for MDAC you should find a few methods to do it.

  19. #19

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    76

    Re: Problem with my code in WIN Xp & WIN 2000

    Hey...you are brilliant ... you have such a good touch on VB...Which comapny do you work ... ?

    just personal interest ...

  20. #20
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Problem with my code in WIN Xp & WIN 2000

    Thanks

    At the moment I am between jobs, but will hopefully be working again in a few weeks.

Posting Permissions

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



Click Here to Expand Forum to Full Width