Search This Blog

Thursday, September 1, 2011

Create table using VB6.0? in access

Q . How to Create a table using VB6.0? in access
Dim db_name As String
Dim db As Database
'Get the database name.
db_name = App.Path
If Right$(db_name, 1) <> "\" Then db_name = db_name & _
"\"
db_name = db_name & "testdb.mdb"
'
' Delete the database if it exists.
On Error Resume Next
Kill db_name
On Error GoTo 0
' Create the database.
Set db = DBEngine.CreateDatabase(db_name, dbLangGeneral)
' Create the table.
db.Execute "CREATE TABLE Dates (TheDate DATE, TheNumber INTEGER)"
Set db = Nothing
MsgBox "Done"

Create internet connection in windows vista , windows 7

Create internet connection in windows vista , windows 7
[setup new connection on windows ]
open computer
click on Network (left side bar)
click on Network and Sharing Center ( Horizontal top tool bar)
click on setup a network connection or Network
click on Connect to the Internet
click on next
select  option " No, Create a new connection"

Click on Broadband (PPoE)
type your user name ( given by your Service Provider)
Type your password
Click on connect
when try to connect click on skip
click on Set up connection anway
click on close
(Your Internet connection is ready to use below  description  for create a shortcut on desktop)
click on manage  network connection
Right click on Broad band connection (On your connection name)
click on option create Shortcut
click on YES

usb mass storage problem

usb mass storagenot detecting , usb pen drive not working , usb hard disk not working.
to solve the above problem may be occur due to  error in windows registry .
1. click on Start
2. click on Run
[to bypass the step 1 & 2 press and hold  Winkey and press r]
4. type -> regedit then and click OK.
4. find the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E980-E325-11CE-BFC1-08002BE10318}
5. Click on Edit menu, and select Delete and click OK.
6. find the  following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}
7. Click on Edit menu, and select Delete and click OK.
8. Exit Registry Editor
9. restart your system.
[Ask answer on techsolve2u@gmail.com]

windows xp print spooler fix

you may experience any of the following symptoms on your Windows XP-based computer:
Q1 .windows xp print spooler fix
Q2. Reinstall Print Spooler Service
Q3. Print Spooler Corrupt
Q4. printer spooler error messages in Windows XP.
Q5. Fix for “The print spooler service is not running"
Q6. You cannot add a printer and you receive printer spooler error
messages in Windows XP
The above problem is very common generally when PC is infected with viruses. To solve this problem you must check & clean you with a good anti-virus software. And do the below step one by one and check to resolve your problem.
Step 1
To start the Spooler service, follow these steps:
a. Click Start, and then click Control Panel.
b. Double-click Administrative Tools, and then click Services.
c. Double-click the Printer Spooler service, and then change the startup type to Automatic. This sets the Spooler service to start automatically when you restart the computer.
d. If you want to start the spooler service immediately, click Start under the Service Status field.
Now Check your Problem is solve / fix or not.

Note : The above work you can also do with run command.
To start the Spooler service by typing 'net start spooler' in the Run and press enter key .
Start computer in safe mode
Now delete spool printer and driver files below path
* C:\Windows\System32\Spool\Printers
* C:\Windows\System32\Spool\Drivers\w32x86
Next, edit the registry
{Note Do any thing change in your windows registry file it may couse to damage your OS please do all own your risk}
First, remove Windows NT subkeys
1.To do this, click Start, click Run, type regedit in the Open box, and then click OK.
2. Find and expand the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86
View the list of subkeys (subfolders). There should only be the following subkeys:
* Drivers
* Print Processors
3. If there are any subkeys other than the subkeys that are listed in step 2, follow these steps:
1. On the File menu, click Export.
2. In the File Name box, type the name that you want to use for this key, such as WindowsNTx86regkey, and then click Save.
NoteYou can use this backup of the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86 registry key to restore the key if you experience any
issues after you complete this procedure.
3. Delete all the subkeys other than the subkeys that are listed in step 2. To do this, right-click each subkey that is not on the list, and then click Delete. Click Yes when you are prompted to confirm the deletion.
Second, remove registry entries for printer drivers
Remove the potentially problematic printer driver subkeys, which may be interfering with the printer you want to use. These may have been installed by third-party printer setup programs. Use the following steps to keep the printer driver and registry entries that came with Windows on your computer and remove all others that may be causing issues.
1. Start Registry Editor if it is not open. To do this, click Start, click Run, type regedit in the Open box, and then click OK.
2. Locate and then expand the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows NT x86\Drivers
The registry entries for the printer drivers that are installed on the computer are stored in the Version-x subkey or subkeys, where x is a number (typically 2 or 3).
3. Export the Version-x subkey or subkeys. To do this, follow these steps:
1. On the File menu, click Export.
2. In the File Name box, type the name that you want to use for this key, such as print driver, and then click Save.
4. Expand the Version-x subkey or subkeys, and then delete the printer driver entries. To do this, right-click each printer driver subkey, and then click Delete. Click Yes when you are prompted to confirm the deletion.
Third, remove registry entries for default print monitors
Remove the potentially problematic print monitor subkeys, which may be interfering with the printer you want to use. These may have been installed by third-party printer setup programs. Use the following steps to keep the print monitors and registry entries that came with Windows and remove all others that may be causing issues.
1. Start Registry Editor if it is not open. To do this, click Start, click Run, type regedit in the Open box, and then click OK.
2. Locate and then expand the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors
View the list of subkeys. There should only be the following subkeys for the default print monitors:
* BJ Language Monitor
* Local Port
* PJL Language Monitor
* Standard TCP/IP Port
* USB Monitor
3. If there are any subkeys other than the subkeys that are listed in step 1, follow these steps:
1. On the File menu, click Export.
2. In the File Name box, type the name that you want to use for this key, such as MonitorsRegkey, and then click Save.
NoteYou can use this backup of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors registry key to restore the key if you experience any issues after you complete this procedure.
3. Delete all the subkeys other than the subkeys that are listed in step 2. To do this, right-click each subkey that is not on the list, and then click Delete. Click Yes when you are prompted to confirm the deletion.
4. Exit Registry Editor.
5. If you have a printer attached to the computer, disconnect the printer cable from the computer, and then restart the computer.
Back to the top
Now verify that the print spooler service is running
Verify that the print spooler service is running. To do this, follow these steps:
1. Click Start, right-click My Computer, and then click Manage.
2. Expand Services and Applications, and then click Services.
3. In the details pane, right-click the Print Spooler service, and then click Start (if it is stopped).
4. Exit Computer Management.
Finally, add a printer and print a test page
If you have a printer attached, reconnect the printer cable to the computer, install the printer by adding it to the computer through the Add Printer Wizard, and then try to print a test page. To install the printer you want, follow these steps:
1. Click Start, and then click Printers and Faxes.
2. Click Add a printer. The Add Printer Wizard starts.
3. Follow the instructions in the Add Printer Wizard to install the printer that you want.
4. Print a test page to make sure that you can print.
[The above procudure is writen with help of microsoft web]

Microsoft Windows Genuine Advantage

Microsoft Windows Genuine Advantage for XP
Remove WGA
RWGA
Remove Windows Genuine notification

To remove WINDOWS GENUINE ADVANTAGE Notifications THE BEST METHOD
download a very small utilyu from beloe link and run it. it is working very fine.

http://www.softpedia.com/get/Tweak/Uninstallers/RemoveWGA.shtml
Thanks for ask a question

VB6 file exits , file present

In visual basic 6.0 it is very important to run your software without any error to check your dependencies file is presented in your application folder.  Like your setting text , ini  and data file.
Below given code I am ussing:
Dim FileInQuestion As String
Dim fname As String
fname = App.Path & "\medishop.mdb"
FileInQuestion = Dir(fname)
If FileInQuestion = "" Then
MsgBox "No such file!"
Else
MsgBox "File exists!"
End If

DATA LINES,BITS,NIBBLES,BYTES,WORDS,BINARY AND HEX

DATA LINES,BITS,NIBBLES,BYTES,WORDS,BINARY AND HEX
Various information inside a computer or on board used is exchanged by using metallic conductors called data lines and group of data.
0 byte value-00000000
Non zero byte-01100010
In C a byte is called a character and is abbreviated char
BIT                              D7       D6     D5        D4        D3        D2       D1       D0
BASE EXPONENT 2^7    2^6   2^5    2^4       2^3     2^2     2^1    2^0
WEIGHT                 128      64       32       16          8          4           2          1
To show a number in hexadecimal in the C language,prefix it with 0x
9B= (9*16)+(11*16 ^0)=155
It would be represent ed as  :   0x9B    or     0x9b
The following shows the byte table again but this time with the weight also expressed in hexadecimal notation,as often seen in C operations.
BIT                                 D7           D6          D5         D4           D3         D2        D1      D0
BASE EXPONENT    2^7        2^6       2^5       2^4         2^3     2^2       2^1  2^0
WEIGHT                     128          64         32          16             8           4            2        1
HEX WEIGHT            0x80     0x40   0x20    0x10        0x08    0x04 0x02 0x01
D8 0x0100
D9 0x0200
D10 0x0400
D11 0x0800
D12 0x1000
D13 0x2000
D14 0x4000
D15 0x8000
For example the decimal number 19070 can be represented as the hexadecimal number 0x4A7E