VJCom - Your Computer Solution

Guides on setting up workgroup networks, Internet Connection Sharing, terminal server and much more. Our Troubleshooting guides will give you step by step instructions on fixing network and internet related problems

 
Calender With Clock


Sponsor Links
Click Adv
Get Paid With AWSurveys
Alert Pay The Way To Pay
Get Money With Adsensecamp
Adsense Indonesia
JMGOLD
Feedjit.com

Click here to get your free mobile phone or apple ipod

Programming - database connection scripts.
Thursday, June 19, 2008
Connections strings using various programming languages to different databases:
Note: watch for word wrap, some text may have moved to the next link
ASP to MSACCESS :
set conn = Server.CreateObject("ADODB.Connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.MapPath("access.mdb")
accessquery = "sql statement here"
set rs = conn.Execute(accessquery)
conn.close
set conn = nothing


ASP to Mysql :
set conn = Server.CreateObject("ADODB.Connection")
conn.open
"DRIVER={MySQL};SERVER=sqlservers;DATABASE=database_name;;UID=user_name;PWD=password"
sqlquery = "sql statement here"
set rs = conn.Execute(sqlquery)
set rs = conn.Execute(accessquery)
conn.close
set conn = nothing


PHP to mysql:
$conn = mysql_connect("sqlserver", "user", "temp123")
or die ("Could not connect");
print ("Connected successfully");
mysql_select_db ("database_name")
or die ("Could not select database");

$query = "sql statement here";
$result = mysql_query ($query)
or die ("Query failed");

mysql_close($conn);


ASP.NET (VB) to MSACCESS :
dim objConn as OleDbConnection
Sub Page_Load (obj as Object, e as EventArgs)
objConn = New OleDbConnection("Provider=Microsoft.Jet.oledb.4.0;Data Source=" & Server.MapPath("access.mdb"))
dim objCmd as OleDbcommand = new OleDbCommand("sql statement here", objConn)
Try
objCmd.Connection.Open()
objCmd.ExecuteNonQuery()
Catch ex as OleDbException
response.write("Error retrieving data")
Finally
objCmd.Connection.Close()
End Try
End Sub


ASP to MSSQL 2000 :
set conn = server.createobject("Adodb.connection")
conn.open Application("connectionString")
conn.open "Provider=SQLOLEDB;Data
Source=sqlservers;UID=username;pwd=temp12;database=database_name"
set rs=server.CreateObject("ADODB.RECORDSET"
rs.open "sql statement here", conn, 3 ,1
conn.close set conn = noth
set conn = nothing


ColdFusion to MySQL :
cfscript
driver="DRIVER={MySQL}";
server="SERVER=sqlservers";
database="DATABASE=database_name";
user="UID=user_name";
pass="PWD=temp123";
conn="#driver#;#server#;#database#;#user#;#pass#;option=16386";
/cfscript

cfquery DBTYPE="dynamic" CONNECTSTRING="#conn#" NAME="sql"
select statement here;
/cfquery


ASP.NET (c#) Mysql :
Private const string ConnStr = "Driver={MySQL ODBC 3.51Driver};" +"Server=sqlserver;Database=database_name;uid=user_name;pwd=temp123;option=3;
Protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Using(OdbcConnection conn = new OdbcConnection(ConnStr))
Using(OdbcCommand cmd = new OdbcCommand("select satement here", conn))
{
conn.Open();
DS1.DataSource =cmd.ExecuteReader(CommandBehavior.CloseConnection CommandBehavior.SingleResult);
DS.DataBind();
}
}

posted by Boni Bona Ventura @ 6:27 PM   0 comments
Setting up Hardware components of a networking
This guide will help you decide what hardware you will need to setup you HOME network:

here are a list of components, you may not need to buy depending on the number of computers you have.

1. Each machine will need a NIC (network interface connectors).
2. a hub
3. router
4. switch
5. cables (crossover / straight through)


Deciding which cable to use:

here's a small chart that will give you an idea which cable should go where:

computer to computer crossover cable
computer to hub straight through cable
hub port to hub port crossover cable
hub uplink to hub port straight through cable
computer to broadband router port straight through cable
computer to switch straight through cable
computer to cable modem crossover cable
cable modem to router crossover cable
hub uplink to switch port straight through cable


note:

Some hubs share the connection on the Uplink Port with the port next to it. Some hubs and switches use a switch or button to enable or disable the Uplink Port. Check your product manual to see how to do this.


Maximum cable length:

Maximum cable length for Ethernet depends on what kind of Ethernet you are talking about! Here are some details on the most popular kinds of Ethernet. (UTP = unshielded twisted pair)


Gigabit Ethernet (over copper), 1000baseT
Speed: 1000 Mbps
Max Len: 100 Meters
Cable: UTP, RJ-45 connectors

Fast Ethernet, 100baseT
Speed: 100 Mbps
Max Len: 100 Meters
Cable: UTP, RJ-45 connectors

Twisted Pair Ethernet, 10baseT
Speed: 10 Mbps
Max Len: 100 Meters
Cable: UTP, RJ-45 connectors

Thin Ethernet , 10 base 2
Speed: 10 Mbps
Max Len: 185 Meters
Cable: RG-58 type coax, 50 ohm impedance

Thick Ethernet, 10 base 5
Speed: 10 Mbps
Max Len: 500 Meters
Cable: RG-58 type coax, 50 ohm impedance


Two computers scenario:

If you only have two computers, you will only need two nic's and a crossover cable. If you also require both computers to have internet access, then you could either

(a). Install another NIC (connect it to the cable/DSL modem with a crossover cable) or fax modem in one and connect it to the internet, then use a software proxy, ICS, Wingate, etc to share the internet.




OR
(b). Get a router (I would prefer getting a router). Connect it using a crossover cable to the cable modem and connect the computers to the built in switch on the router. Some routers don't have built in switches, in this case you will need to get a switch or hub and connect it to the internal interface of the router.





More than two computers scenario (hub/switch cascading):

With more computers you will need a hub/switch and straight through cables, connect all computers to the hub/switch with straight through cable. If you run out of ports then add another hub/switch to your network. Connect the uplink of one hub/switch to a port on the other hub/switch using a straight through cable, or connect port to port using a crossover cable.



If you have more than two hubs/switches, then connect all the hub/switches using uplink ports and straight through cables, to regular ports on a main hub/switch.



If you require internet connectivity:

(a) Install another NIC (connect it to the cable/DSL modem with a crossover cable), or fax modem in one machine and connect it to the internet. Use a software proxy, ICS, Wingate, etc to share the internet.
Now connect the gateway computer and the rest of the computers to the hub's ports using straight through cables.


OR



(b) Using a broadband router, connect a cable modem with a crossover cable to the WAN port of the router, then connect the other computers to the router's LAN ports with a straight through cables.
If you do not have enough ports then get more hub/switches. Connect the uplink ports to the router's LAN port with straight through cables and connect your computers to the hubs/switches.




posted by Boni Bona Ventura @ 4:44 PM   0 comments
PC Hardware Troubleshooting Guide
Tuesday, June 10, 2008
Pc Boot problems: (beep codes)

IBM BIOS:


IndicatorSystem status
No Beeps - No PowerLoose Cord, or Short.
1 Short Beep - Normal POSTComputer is ok.
2 Short Beep - POST errorreview screen for error code.
Continuous Beep - No PowerLoose Cord, or Short.
Repeating Short Beep - No PowerLoose Card, or Short.
One Long and one Short BeepMotherboard issue.
One Long and Two short BeepsVideo (Mono/CGA Display Circuitry) issue.
One Long and Three Short BeepsVideo (EGA) Display Circuitry.
Three Long BeepKeyboard / Keyboard card error.
One BeepBlank or Incorrect Display Video Display Circuitry.

Award and Phoenix BIOS:


IndicatorSystem Status
1 short beep:Normal
2 short beepsCMOS error
1 long and 1 short beepRAM error
1 long and 2 short beepsVideo card error
1 long and 3 short beepsKeyboard error
1 long and 9 short beepsROM error
Long continuous beepsRAM not installed correctly
Short continuous beepsBad power supply or over heating

Problem with power supply or CPU chips:

Make sure the power connector is connected correctly and fitted firmly in the motherboard socket, some mother boards require two connectors from the power supply, refer to mother board manual. If the problem persists try using a different power supply. Check CPU fan,remove chip and clear dust, make sure it is mounted properly.


Video card problem:


Remove video card and inspect for cracks or bad connectors. Make sure the video card mounted correctly in the slot, try using a different video card.


Keyboard error:

Either the key board is not functioning or is not attached correctly, try a different key board, if its has a PS/2 connector then make sure its not plugged into the mouse connector.


RAM error:

Remove ram inspect for cracks, bad connectors or dust. Insert the chip back into the slot and make sure its firmly seated properly in the slot, if the mother board has more then one slot then make sure the chip is in the first slot (i.e. closest to the CPU). If the problem persists change ram.Download MS memory diagnostic.


No beeps and no POST

Pull everything out of the machine except for the CPU and power the PC up. The PC should now only consist of a power supply, a motherboard and a CPU/HSF. This means your PC should have no video card, RAM or IDE cables. You should have no PCI cards and that includes modems and sound cards. Have a power button and speaker hooked up to the board so you can turn it on and listen for beep codes.



If you have the PC stripped down this much and you still do not get any beep codes, then you may have an issue with either the CPU, motherboard or power supply.


Problems after booting:


Pc Freezes:

Check CPU fan, case fan and power box fan, make sure all are working and clean off dust. Check hard drive, CPU, power supply for over heating. Some video cards may also heat up and create excessive heat inside the case. Make sure that the case is kept cool, by maintaining good air flow.



  • Scan hard drive for bad sectors.

  • Make sure all devices are functioning properly are plugged in. Unplug any faulty device.

  • Unplug any new devices or software installed.


Pc Restarts while in use:

One problem could be bad RAM, replace RAM and restart machine. Open up resource hungry applications like Office, Photoshop, many instances of internet explorer until all the ram is used up. If system doesn't freeze or restart then return old chip to manufacturer.


<



Check capacitors on motherboard make sure that they aren't bulging, leaking, or burned. If they are - that's the problem.


Voltage problem or overheated components:

If the computer is actually functioning and the computer beeps continuously, then there is a problem with a voltage on the power supply being incorrect or the CPU overheating. Go into the BIOS and check CPU temperature, fan speed and voltages

posted by Boni Bona Ventura @ 5:03 PM   0 comments






About Me

Name: Boni Bona Ventura
Home: Medan, Sumatera Utara, Indonesia
About Me:
See my complete profile
Previous Post
Archives
Links
Powered by

BLOGGER

Donate This Site
E-Gold
Amazon
© 2008 VJCom - Your Computer Solution