Skip to main content

Posts

Showing posts from November, 2010

วิธีใช้งาน visual Basic 2005 กับ ฐานข้อมูล SQL Server 2005

วิธีใช้งาน visual Basic 2005 กับ ฐานข้อมูล SQL Server 2005
เมื่อกี่ไปเห็นที่ Google Guru มีคนถามถึงเรื่องนี้งั้นผมขอ แชร์ด้วยคนนะครับ

สร้าง connection ก่อนครับ

Module conndb

Public SLDBconnection As String = ReadINI.INIRead(Path.GetFullPath(".") & "\dbini.ini", "APPCONFIG", "SLDBconnection", "")


End Module
-----------------------------------------------------------------------------
ส่วนใน DBini file นั้นผมเขียนไว้ประมาณนี้ครับ


[APPCONFIG]
SLDBconnection = Data Source=nb-montree;database=Database;uid=sa;pwd=sa



usr=
pwd=

----------------------------------------------------------------

ต่อไป Class สำหรับอ่าน ini ครับ

Public Class ReadINI
#Region "API Calls"
' standard API declarations for INI access
' changing only "As Long" to "As Int32" (As Integer would work also)
Private Declare Unicode Function WritePrivateProfileString Lib "kernel32" _
Alias "WritePrivateProfileStringW" (ByVal lpApp…

วิธีคิด เปอร์เซ็นส่วนลดสินค้า

วิธี คำนวณ เปอร์เซ็นส่วนลดสินค้า เสื้อผ้า

วันนี้ผมมี วิธี คำนวณ ส่วนลดสินค้าว่าที่ร้านลดให้เรานั้นคิดเป็น กี่เปอร์เซ็นกันแน่
ตัวอย่างเช่น ร้านขาย เสื้อผ้าแฟชั่นสไตล์เกาหลี ร้านขาย แฟชั่นสไตล์เกาหลี ติดป้าย ราคาขาย เสื้อผ้าแฟชั่นสไตล์เกาหลี ไว้ 1300 ผมเข้าไปต่อราคาเหลือ 850 บาท และถ้าผมอยากรู้ว่า ร้านนั้นเขาลดราคาให้ผมกี่เปอร์เซ็นกันแน่นะ มาเริ่มกันเลยดีกว่า

ผมกำหนดให้ ราคาเก่า = X ,ราคาใหม่ = Y , Z = จำนวนเงินส่วนลด
z = x - y
z = 1300 - 850
z = 450 บาท

ฉะนั้นผมรู้แล้วว่าร้าน ขาย เสื้อ เสื้อแฟชั่นสไตเกาหลี ลดให้ผม 450 บาท แล้ว 450 บาทนั้นคิดเป็นกี่เปอร์เซ็นของ 1300 ล่ะครับที่นี้
PD = Percent Discount
PD = (z/x) x 100
แทนค่า

PD = (450/1300) x 100
PD = 34.61 %

ฉะนั้นเราก็รู้แล้วนะครับว่าเราได้ส่วนลดตั้ง 34.61 เปอร์เซ็นเลยที่เดียว
ผมคิดว่าสูตรง่ายพวกนี้เป็นสิ่งที่เราไม่ควรมองข้ามนะครับเลยเก็บมาฝากเพื่อน ๆ พี่ ๆ น้อง ๆ ครับ

Link for Free web directory submit

Link for Free web directory submit, free web site submit,submit web page
Hi,Friend. You are looking for free Link Submit Web high Rank .
This link help you to finding the High Rank(PR) and Free Submittion web . you can click on the link
and then you find out the web for you submit, i think,You choose PR each the web should be that more than you web site or you choose PR > 2 and then when you stay on the submittion web you must to find out wording is Submit Link,Submit site ,something like that.
Okay Let go to Free web directory submit.

การ add on new domain name to hosting of godaddy.com

วิธีการ How to add on new domain name to hosting of godaddy.com

Hi ,Friend,I can help you to add secound new domain name to godaddy.com.
you can follow by below.

1. Login to www. godaddy.com
- Log in with user name and Password of your host
2. choose the host name for you need to add new domain name .
3.Click Launch Button


4. Look at the Menu Click on the "Setting" and then " Domain Management"5.Look at the right Top Screen clikc on "Add Domain"6.fill in the your domain for example 9montree.com7.Choose the Path or create new the folder for keep your website files.8. Finish the Step for Add on domain name to hosting of www.godaddy.com

Thank you.

Solution for correct Limited or no Connectivity wireless on Laptop windows xp,vista

Solution for correct " Limited or no Connectivity wireless " on Notebook ,Laptop used windows xp,vista

Hi , friend , I have found the problem can't connect to the network and then i have check the Network Icon and then i took double click on that i have found the message is " Limited or no Connectivity wireless " .

Solution : Reinstall the Wireless and then please sure, you uninstall the old driver first and then
restart Machine and install Wireless Driver on Laptop againts.

Thank you.

ms sql server 2005 restore failed because the database is in use.

Ms sql server 2005,Express,2008 restore failed on ERP Syteline Database because the database is in use. Hi, Friend.If you looking for solution for restore database with out error same below

" system.data.sqlclient.sqlerror:exclusive access could not be obtained because the database is in use. "


from message above i sure , you have been restoring the database while that have the application is in use so i have script for find out the problem .

1. Log in to sql server -> create new query -> key in the script
use Database name
exec sp_who -- if you need to check who have been using the database.
From a picture . Sured, the database is in use.



2. Stop Service of Application to use the MS SQL server 2005 | Express | 2008





3. Run Restore against . I have sured , you can restore the database MS SQL 2005 ,Express , 2008





Free Solution : The Service did not respond to the start on Windows xp

error 1053 : The Service did not respond to the start or control request in a timely fashion

Problem : Because the system event log full .

Solution : Clear the Event system log and application log and then restart the service against.


How to create schedule backup sql server 2005 (Cont 2)

How to create | Creating | Build | schedule backup sql server 2005 | sql server 2008

6. you can Right Click or Double on the Task below.
if you Right click , You must to select the Edit menu for in put the Backup Detail .



7. Fill in and Key in the input deatil
Back up type : Full if you want to backup every thing you can select other backup type by Drop Down Lit.
You don't forget to choosed the Database name ,You want to backup .




8. Setup the path for keep the backup file and Last name of Backu file (*.bak)
Finish the input the backup database detail.




9. Go to Step ,Set up the Schedule Time for the Backup
Click on My High Light in the picture.



10. Key in the Job Schedule Detail.



11. Click Save for you confirm the Schedule Time.


12. When you finish the create the Schedule Backup database so you will see same below.



13. You can waiting untill the Schedule follow by you set up or Right Click -> Exec on the Job Plan and If that finish ,You will see the Message Box below .






14. Go to th…

how to solve The system cannot find the file specified on windows xp

how to solveThe system cannot find the file specified on windows xp
Now , I have used the windows XP3 . I have found that when i try to start the one service .
so , I try to start that many time but the error have been same so that have root cause is
The Event Log is full so you must to delete or clear the System Log and Application Log and then restart the service against . I sured that worked.
below is method for clear that.

How to trust Database sql server 2005

How to trust Database sql server 2005,Express
Okay,I must to used the SQL script when you have to restore the database from the database backup from aother Machine so You must to run the script for change some thing to your machine .

1. Log in to the SQL Server .
2. Open the new Query and then copy below .

alter database [your database name]
set trustworthy ON;


Plase waiting for the Compleated message .

Thanks.

Google turns off GMail data feed to sites like Facebook

Google turns off GMail data feed to sites like Facebook
GMail contacts will no longer be automatically handed over to other websites and services, says Google.The search firm will now only share user information if the site wanting access provides reciprocal data feeds to others.The policy switch was primarily aimed at Facebook, said Google, complaining that the social network left users in a "data dead end".Google said the policy switch would be implemented over the next few weeks.Like many other web firms, Google lets others get at the data it holds on users of its many services via what is known as an Application Programming Interface (API). Before the policy switch sites such as Facebook used Google's API to let their users automatically import GMail contacts so they could rapidly fill out their profile and find others that use the service.Now Google will only give automatic access to GMail contacts to those sites and services that let others mine the data the…

Solution for solve the problem Restore Database failed for Sql server 2005 ,SQL Express วิธี แก้

การ วิธี แำก้ How to Restore Database SQL Server 2005,SQL Express ?
I have found the error "Restore failed for Sql server 2005 ,2008,SQL Express
Additional information.
system.data.sqlclient.sqlerror :The backup set holds a backup of a database other than the existing.
" the picture below when i try to restore the database from my database backup ,I have forgot tell you to My database server is version SQL Server 2005 but you can apply that to used to SQL Server 2008,MS SQL Express .
Root cause of problem: The system warning that for inform you to unsure you are working about Restore database while you have the existing database so you can follow to my Step.

Message Error.








Restore failed for Sql server 2005 ,2008,SQL Express
Additional information.
system.data.sqlclient.sqlerror :The backup set holds a backup of a database other than the existing.


Solution : After the you found the message . you not close the the form because you can you to Options Tab by Click Left on that and …

Free Norton Removal Tool Download -ฟรี

Free Norton Removal Tool Download in the us ฟรี
Befor the Antivirus patch will release you can used the Removal Tool first and then you can you it free in case you don't have the Norton Antivirus software .

Note : One the Removal tool download you can clean that only one Virus and then you don't forget follow by the information because after you done scan the Virus may be you must to change some thing in the registry . Good Luck.

for scans and clears your PC of spyware and viruses
Click Link : http://us.norton.com/security_response/removaltools.jsp

Virus List :


09/13/10W32.Imsolk.B@mm Removal Tool09/06/10Backdoor.Tidserv Removal Tool10/29/09Trojan.Ramvicrype Removal Tool04/16/09Symantec Trojan.Ransomlock Key Generator Tool04/15/09Trojan.Initbar Removal Tool03/24/09Trojan.Xrupter Removal Tool02/20/09W32.Virut Removal Tool02/01/09Trojan.Bankpatch Removal Tool01/13/09W32.Downadup Removal Tool07/22/08Trojan.Brisv.A!inf Removal Tool01/11/07Backdoor.Haxdoor.S/Trojan.Schoeberl.E Removal To…

Free Download Norton Antivirus Update

Free Download Norton Antivirus Update | for Windows 2000/XP/Vista/windows 7

If you have problem same me when i need to download the AntiVirus File Update so it hard to find a link for that ,Therefore i have build the short cut for you click this link that bring you to download screen about that. Link below.

Note:
You can choose the file name is yyyymmdd-XXX-x86.exe if you need to download first and the used that to other client.

http://www.symantec.com/business/security_response/definitions/download/detail.jsp?gid=n95



Supports the following versions of Symantec antivirus software:

* Norton AntiVirus 2005 for Windows 2000/XP Home/XP Pro
* Norton AntiVirus 2006 for Windows 2000/XP Home/XP Pro
* Norton AntiVirus 2007 for Windows XP Home/XP Pro/Vista
* Norton 360 version 1.0 for Windows XP/Vista
* Symantec AntiVirus 3.0 CacheFlow Security Gateway
* Symantec AntiVirus 3.0 for Inktomi Traffic Edge
* Symantec AntiVirus 3.0 for NetApp Filer/NetCache
* Symantec AntiVirus 10.0 Corporate Edition…

How to create the schedule backup sql server 2005 ,2008

How to set auto schedule backup sql server 2005 | sql server 2008

Hi,Friend .I'd like to present about how to create the schedule database backup for sql server 2005,2008 so you can follow my step.

1. Log in the Sql server by user and then user should be have to grant the Admin permission.



2. Clikc on the Management Folder and then you will see the folder name is " maintenance plans " and then Right Click and choosed the "New maintenance Plan"



3. Key in the Job's Name follow by you want that and then Click OK.



4. Left Click and Drage the Back up Database Task to the working area.



5. You have seen the Back up Database Task from your Drag just now .




Click Here to See The Next Page

How to Maintenance SQL Server 2005

วิธี การ Maintenance SQL Server 2005 | Maintenance SQL Server 2008 | SQL 2005 Express | Sql management Studio
How to SQL Server Maintenance
SQL Server statistics that are out of date and tables and indexes that are significantly
fragmented adversely affect system performance. You can monitor their condition and take
steps to enhance their performance.



Statistical Information


SQL Server uses statistical information about the distribution of values in a column to
determine the optimal strategy for evaluating a query. Distribution statistics help the
system estimate how efficient an index would be in retrieving data associated with a key
value or range specified in the query.
As the data in a column changes, index and column statistics can become out-of-date,
affecting query performance. The statistics should be refreshed anytime significant
numbers of changes to keys occur in the index.



You can use the dbcc show_statistics statement to generate a report on the distribution
statistics for an index. …

How to write command line | Script backup database sql Server 2005

How to write command line | Script backup database sql Server 2005

Start from create the BAT File first. Open the Notepad Program
Copy the Script below to Notepad Program and then you must to change on Highlight .


@ECHO OFF

@echo.
@echo +++ Begining Backup DB +++
sqlcmd -Slocalhost -Usa -Psa -i"bk_app.sql" -b
IF %ERRORLEVEL% NEQ 0 GOTO err_bkp_failed

:success
rem cls
@echo.
@echo.
@echo.
@echo.
echo +++ Database Backup successful +++
pause
exit

:err_bkp_failed
@echo Database Backup Failed
pause
===================================================================

Next Step,

Write the SQL Script , I have writed the script to control the part and naming of file so you must to change for highlight.


declare @ty char(4)
declare @tm char(2)
declare @td char(2)
declare @tbkname char(50)

set @ty = '';
set @tm = '';
set @td = '';

set @ty = convert(char,year(getdate()))
set @tm = convert(char,month(getdate()))
set @td = convert(char,day(getdate()))
set @tbkname = 'D:\SLBACKUP\KLK_DBBACKU…