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.....
Printable View
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.....
post some code if you want some help
pete
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...
Is it showing any error while you try to run the application in 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
you probably need to write to a log file to find out where it is gettinig a problem
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"
How do I write a log file ...I have done it .. can oyu help ... plss
To create a log file you need to trap the error. You need to remove "On Error Resume Next" from you code
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 ...
post your connection string to database
But the same is working fine on WIN Xp systems ... anyways here is the connection string
VB Code:
With con .ConnectionString = "Provider=SQLOLEDB.1;User ID=sa;Initial Catalog=IBM;Data Source=9.184.63.53,1433" .Open End With
The IP address is of the system where SQL server is installed....and 1433 is the TCP/IP port
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! :eek2:
Problem 3 - Assuming the database is SQL Server 2000 (or later) you need to install MDAC (link below) for Windows 2000 or earlier machines.
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...
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.Quote:
Originally Posted by rupeshkumar_rj
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.
There is no decent alternative.. to be able to connect you need the drivers, and they are contained within MDAC.Quote:
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...
You could install other things to make it work, but they would all contain MDAC, so what would be the point?
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 .. ?
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.
Hey...you are brilliant ... you have such a good touch on VB...Which comapny do you work ... ?
just personal interest ...
Thanks :D
At the moment I am between jobs, but will hopefully be working again in a few weeks. :)