**** IZVADI STRING OD STRING
**** 'STO' E STRINGOT STO TREBA DA SE IZVADI
close tables all
set exact off
clear
use odbrani
sto='.'
*scan
sto='.'
lensto=len(sto)
*sto =
* alltrim(odbrani.f)

select odbrani
*set filter to atc(sto,a) <> 0 and j <> .T. or atc(sto,b) <> 0 and j<> .T.
set filter to atc(sto,f) <> 0 
*or atc(sto,e) <> 0 
*brow
go top
scan
? odbrani.f
dolzina=len(odbrani.f)
? dolzina
m= atc('.',odbrani.f)
m.f= left(odbrani.f,m-lensto)+right(odbrani.f,dolzina-m)
? m.f
gather memvar fields f
endscan
set filter to atc(sto,f) <> 0 
*brow
count to aQ
if aQ = 0
wait window '  DOBRO E NEMA POVEKE OD OVOJ STRING'
ELSE
WAIT WINDOW ' POVTORETE JA PROCEDURATA'
ENDIF



 

 

*CREATE FORM WITH CURSOR ADAPTER, ADD OBJECTS


Public oSample
oSample = Createobject('myCAFormSample')
oSample.Show()

Define Class myCAFormSample As Form
  DataSession=2
  Height=300
  Width=400
*************************VIDI JA OVAA TEHNIKA NA ADD OBJECT SO WITH
  oCustomer = Null
  Add Object txtCustomerID As TextBox With Top=10,Left=10,ControlSource='Customers.CustomerID'
  Add Object txtCompany As TextBox With Top=40,Left=10,ControlSource='Customers.CompanyName'
  Add Object txtContact As TextBox With Top=70,Left=10,ControlSource='Customers.ContactName'
  Add Object grdNav As Grid With Top=100,Height=200,Width=400,Anchor=14

  Procedure Load
    Local cn As 'Adodb.Connection', oRs As Adodb.RecordSet
    cn  = Createobject('ADODB.Connection')
    cn.ConnectionString = 'Provider=VFPOLEDB;Data Source='+;
      'c:\Program Files\Microsoft Visual FoxPro 9\Samples\Northwind\northwind.dbc'
    cn.Open()

    oRs = Createobject("ADODB.Recordset")
    oRs.Datasource.CursorLocation = 3   &&adUseClient
    oRs.Datasource.LockType = 3   &&adLockOptimistic
    oRs.ActiveConnection = m.cn

    This.oCustomer=Createobject("CursorAdapter")
    With This.oCustomer
      .DataSourceType = "ADO"
      .Datasource = oRs
      .MapBinary = .T.
      .MapVarchar = .T.

      .Alias = "Customers"
      .SelectCmd = "SELECT * FROM Customers"

      If !.CursorFill()
        * Replace with error code here
        Local laError
        Dimension laError[1]
        Aerror(laError)
        Messagebox(laError[2])
      Else
        Local lcStr,lnFldCount,i
        Local Array laFlds[1]
        lnFldCount=Afields(laFlds)
        lcStr=""
        For i = 1 To m.lnFldCount
          lcStr = m.lcStr + laFlds[m.i,1] +  ","
        Endfor
        .UpdatableFieldList = m.lcStr
      Endif
    Endwith
  Endproc

  Procedure grdNav.AfterRowColChange
    Lparameters nColIndex
    Thisform.Refresh()
  Endproc
Enddefine


 

west wind on web browser control:

http://www.west-wind.com/presentations/shellapi/shellapi.asp#_The_Web_Browser_Control

also general forum thread:

http://social.msdn.microsoft.com/Forums/en/visualfoxprogeneral/thread/c26b584e-7ab1-43cf-a240-e7e007ea5d85

 
Make a Free Website with Yola.