(http://www.vb2themax.com/images/logomini.gif)
[u:7
c8c67a2c4]Winsock programming[/u] (http://www.vb2themax.com/HtmlDoc.asp?Table=Articles&ID=430&Page=1), Transmission Control Protocol/Internet Protocol (TCP/IP).
arkadaslar yukaridaki linkte Visual Basic programin server kisminda
söyle birsey yaziyor:
-------------------------------------------------------------------------------
Creating the Server
The server
portion of the price lookup example is designed to accept the item number sent from the client and look up the associated price in a database. The server than sends the information back to the client.
There is file named as “path.txt” in the folder called as “server”. Locate that file and change the database path in the file to the location where the database is located on
your machine. The connection to the database is made in the DataArrival event of the Winsock control. The following code segment opens the database and finds the first occurrence of the value in
sItemData. When the record is found, the value contained in the price field is sent back to the client.
' Get clients request from database
strData = "Item = '" & sItemData
& "'"
rs.Open "select * from prices", strConnect, adOpenKeyset, adLockOptimistic
rs.Find strData
strOutData =
rs.Fields("Price")
-------------------------------------------------------------------------------------
bu arkadasin anlatmaya calistigi "database" olayi nedir nasil yapariz
?? birde "path.txt" in icinde bu dadabase dosyasinin oldugu yeri göster yaziyor, bu nasil yazilacak neden böyle bir seye ihtiyac var?
programi compile/run yaparken
"Dim fso As New FileSystemObject,...." üzerinde durup bu mesaji veriyor: "Compile error!, user defined type not
defined" ?? burada forma bir object felan mi eklenecekti ?
VB dosyalari buraya
koydum
http://home.no/fsan/projects/Diverse/Winsock%20programming/
tesekkürler...
Alıntı YapThe database used in the sample is also provided with the code. The database name is
Prices.mdb. This is a small database comprising of a single table containing two fields. The fields are item number and price. The clients
sends the item number to the server and the server retrieves the price against that item number from the database and sends it back to the client.
Kardeş yukarıdaki
alıntıyı siteden aldım. Koyu reknli yerlerde vurguladığım gibi "Prices.mdb" isminde bir veritabanı ve içinde "price" isminde sütün oluşturdun mu?
Alıntı YapThere is file named
as “path.txt” in the folder called as “server”. Locate that file and change the database path in the file to the location where the database is located on your machine.
The connection to the database is made in the DataArrival event of the Winsock control.
Anladığım kadarıyla program FSO ile Winsock
denetiminde veritabanına erişiyor. Dolayısıyla "path.txt" içinde veritabanında tanıtmak gerekiyor. Eğer veritabanı bir web server üzerinde değilse yani lokal çalıştırıyorsan denetim masasından
tanımlamalısın.
Kolay gelsin...
"Compile error!, user defined type not defined" bu demek oluyor ki tanımlı tip yok veya bulunamadı. sizin kullandığınız
FileSystemObject şu an projenizde aktif olarak bulunmuyor. reference'lerden akleyin.
sizde demişsiniz zaten object falanmı eklenecek. tam üstüne basmışsınız.
ilgili nesneyi
referanslardan ekleyin.
kolay gelsin