Re: Accessing Informix from Unix or C please help
Posted in 1999
Hi Mark!
If you have Informix-4GL compiler ...
a i4gl function would look something like:
-----
function cmdNext_Click()
define number smallint
If txtCustomerNum is null Then
select count(*) into number from customer where ....
if number =0 then
message "No Records Found."
end ifelse
clear form
let txtCustomerNum = ....
...
end function
-----
You can execute a compiled 4GL from Unix-shell.
best regards
rick
Mark wrote:
>
> Below is a function written in VB withSQL to access aAccess97 database.
> Now how would you write something like this to access an informix database
> from unix or C
>
> Please paste some code for example if possible
> Email to booker@gate.net
> Thanks, Mark
>
> Private Sub cmdNext_Click()
> If Trim(txtCustomerNum) <> "" Then
>
> Dim dbBlockBuster As Database
> Dim ssCustomer As Recordset
> Dim sSql As String
>
> Set dbBlockBuster = Workspaces(0).OpenDatabase(dbBlockBusterPath)
>
> sSql = "SELECT DISTINCTROW * from customer WHERE ((Customer.CustomerNum)
> > " & txtCustomerNum & ");"
> Set ssCustomer = dbBlockBuster.OpenRecordset(sSql, dbOpenSnapshot)
>
> If ssCustomer.NoMatch Or ssCustomer.EOF Then
> MsgBox "No Records Found.", vbInformation
> Else
> ClearForm
> txtCustomerNum = ssCustomer!CustomerNum
> txtFirstName = ssCustomer!FirstName
> txtLastName = ssCustomer!LastName
> txtAddress = ssCustomer!Address
> 'If Trim(ssCustomer!Birthday) <> "" Then txtBirthday =
> ssCustomer!Birthday
> txtPhone = ssCustomer!PhoneNum
> 'txtVideoCount = ssCustomer!videoCounter
> 'txtZipCode = ssCustomer!Zipcode
> End If
> ssCustomer.Close
> dbBlockBuster.Close
> Bchangefound = False
> Else
> MsgBox "No existing Customer exist.", vbCritical
>
> End If
>
> End Sub