|
one normally stores the database and the web site on the same machine (or machine cluster). That is why the typical web host will offer PHP+MySQL facilities, or ASP.NET+SQLServer, or whatever combination makes sense to the market.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
Thanks for the reply. Seems my last resort is to really host my own website to my local machine.
|
|
|
|
|
I trust there are ways to keep site and database apart, however I see lots of disadvantages. Why can't you have a database where your site is? If that really is the case, I would consider switching web hosts.
Having your own host is a pain, you need to provide hardware and software, have a fixed IP address and sufficient bandwidth, probably organize redundancy for reliability, organize backups, maybe a help desk, etc. There are thousands of web hosts all around the world, and a lot of them are free. Use Google to find out, this[^] is just one I stumbled upon.
BTW: you probably are best served by a host you pay for the service. My site is hosted here[^], for some 80 euro a year.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
My reason to connect my website to my local database is to sync the two database from my local machine database and the database I upload also from the site. I can get some database records coming from my website and use the records to update my back end program using web service of asp but a big problem came that my back end program could not sent its database records to my website
By the way my website was a simple online registration for school and the back end program is the offline part its a school project of mine and kinda cramming because few months left before the deadline.
Thanks also for the link on the free hosting site I might give it a try.
Thanks,
DAN
|
|
|
|
|
OK, you want a remote backup.
This is what I do manually:
- I have a local database on my dev machine, and a similar one at ny web host;
- I transfer tables (never the entire DB), from one to the other using PHPMyAdmin; "export" creates a text file, filled with SQL commands that could delete and recreate an entire table; "import" would execute such file, hence dropping the existing and creating the replacement table.
Of course there could be very good reasons to automate this. Haven't done that yet.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
Thanks again for that great help, would you mine if you could show how will I do that using asp
Thanks again,
DAN
|
|
|
|
|
Sorry, I don't know for ASP and SQLServer, I do it with PHPMyAdmin which is for PHP+MySQL.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
Thanks still for the great idea. I will try and hope I can do it with asp using the idea you give me.
Thanks,
DAN
|
|
|
|
|
It is actually entirely possible to do what you are trying to do. Most large companies do not host the database and the web server on the same physical server. It is best practice to have them at the same location so they can be on the fastest possible network however.
First make sure you have a static IP Address where you wish to host your SQL server (you can also look at a dynamic IP solution more complex though)
Open the port for your chosen SQL software
Have you web service connect to the SQL server using the static IP Address from above.
I have done this before, several times, and results vary. You almost always want a very fast connection to your database, usually on the same LAN, sometimes it doesn't matter. You'll find out pretty quick.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hello,
Thanks for the great info. Would you mine if you could give me some a little help or info on how can my asp.net web service connect to the static IP where my SQL server is located. Kinda Google it almost everyday but still don't find some way on how to do it.
Thanks,
DAN
|
|
|
|
|
Hi,
I am trying to control the fan via relays and pc's parallel port.First time by running the c# code it turned on the fan but later on if i stop debugging of the program fan is not switched off.It is just swtiched off by unplugging the adapter. And second time whenever i plug the adapter it is turned on without running the program.It works by plugging the adapter just. I want to control it whenever i press the button in c# it is turned off and by pressing the other button it should be turned on. I dont know how to resolve this?? If any one knows then plz let me know.
Thanks in advance.
Regards,
Aeman
|
|
|
|
|
If you stop debugging, then there is nothing you can do: this is the software equivalent of a tree across the railway tracks: your application does not continue.
There is AFAIK no equivalent of a Finally or event which can catch when the debugger is stopped.
Sorry, but I don't think you can do anything in this case.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
To add to what I said in the last reply:
The Parallel port is hardware: if you do not tell it to change, then it won't.
So if you tell the port "switch the fan on" then a physical signal (presumably one of the parallel port pins) is set to high or low. If you do not tell it to change, that is where it stays.
If your app exits without changing the pin back to "off" then the pin will stay high, until the PC is reset probably. Stopping the debugger exits your app immediately, it does not give it a chance to reset any signals you might normally change in your end-program code.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
yes the signal is set high even if i stop debugging. that's y i was asking what should i do to set the signal low. i cant remove parallel port every time to set it low. there should be something logical.
|
|
|
|
|
Whatever code you used to set the signal high, reverse it!
If you think you will stop the app via "Debug...stop debugging" often, then write a small app that just sets everything "Safe" and run it manually immediately after you stop it.
In your "real" app, then the main form Close event should probably do pretty much the same thing.
What code are you using to set it high?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
hmmm thanks i try. i m using the following line to set it high
PortAccess.Output(888, 0);
|
|
|
|
|
|
yes i took help from this article.
thanks my problem solved this is very good article.
|
|
|
|
|
And that is yet another reason to prefer a serial port, where you can teach the port to behave in a certain way for as long as it is yours. It may be that the control outputs have a default state all by themselves, I don't recall; if not, you sure can give the SerialPort a finalizer that returns everything to a quiescent state when your app is done or closes the port.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Or you can just abandon the serial and parallel ports entirely (since todays PC's don't even have parallel ports anymore!) and use something like a Phidget Interface and motor controller. Go to Phidgets.com[^]. That way, you won't risk burning up the port that is on your motherboard.
|
|
|
|
|
Hey, that's pretty nifty. Thanks.
|
|
|
|
|
Cool Stuff.
All the best,
Dan
|
|
|
|
|
Also, it would be best if, in the startup of your app, you set the parallel port to a known state before you really get into your main code.
|
|
|
|
|
How do I install a game I've made in XNA(using Visual Studio 2008) on a computer that does not have Visual Studio? Please help. the simplest way would be the most Awesome
|
|
|
|
|
I don't know about XNA in particular.
In general, one does not need Visual Studio to execute a program developed with Visual Studio.
For managed code (such as C#), one needs the .NET FrameWork, which comes in several versions; one needs the version that was targeted, there is no automatic substitution if your system happens to have a higher version.
AFAIK you need to install .NET separately, you can't just ship it with your app and make it look as a single install. Microsoft does not give redistribution rights for .NET, you'd have to install from their site.
BTW: modern Windows versions (Vista, 7) normally come with a number of .NET versions pre-installed, typically all that were available when the Windows version became available itself. So if e.g. you build for .NET 2.0, it should just run fine on any Vista/7 system as is.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|