Click here to Skip to main content
15,883,938 members
Home / Discussions / Database
   

Database

 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201119-May-12 4:38
jojoba201119-May-12 4:38 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen19-May-12 5:05
professionalEddy Vluggen19-May-12 5:05 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201120-May-12 2:42
jojoba201120-May-12 2:42 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen20-May-12 3:03
professionalEddy Vluggen20-May-12 3:03 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201120-May-12 17:38
jojoba201120-May-12 17:38 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen21-May-12 4:30
professionalEddy Vluggen21-May-12 4:30 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 20:11
jojoba201121-May-12 20:11 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen22-May-12 0:52
professionalEddy Vluggen22-May-12 0:52 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201122-May-12 3:22
jojoba201122-May-12 3:22 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen22-May-12 8:50
professionalEddy Vluggen22-May-12 8:50 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201122-May-12 23:24
jojoba201122-May-12 23:24 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen23-May-12 0:16
professionalEddy Vluggen23-May-12 0:16 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201123-May-12 3:37
jojoba201123-May-12 3:37 
AnswerRe: How to get delete/Update row + SQL Pin
Eddy Vluggen23-May-12 8:23
professionalEddy Vluggen23-May-12 8:23 
AnswerRe: How to get delete/Update row + SQL Pin
Mycroft Holmes20-May-12 12:55
professionalMycroft Holmes20-May-12 12:55 
AnswerRe: How to get delete/Update row + SQL Pin
Corporal Agarn21-May-12 0:49
professionalCorporal Agarn21-May-12 0:49 
GeneralRe: How to get delete/Update row + SQL Pin
Eddy Vluggen21-May-12 3:45
professionalEddy Vluggen21-May-12 3:45 
GeneralRe: How to get delete/Update row + SQL Pin
Corporal Agarn21-May-12 3:51
professionalCorporal Agarn21-May-12 3:51 
GeneralRe: How to get delete/Update row + SQL Pin
Eddy Vluggen21-May-12 4:27
professionalEddy Vluggen21-May-12 4:27 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 13:04
JohnPayton21-May-12 13:04 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 20:08
jojoba201121-May-12 20:08 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 20:25
JohnPayton21-May-12 20:25 
Sure, this is a snippet from a routine in VB6, but it would be easy to convert it to VB.Net.

In this instance I'm recording the method of payment and amounts from each transaction.

If the log.txt file does not exist then create it, otherwise append to it.

You will notice this particular log file is called LogReturns.txt and it's in the root directory of the program executable.

Hope this is what you are looking for.

On Error Resume Next
    Dim fso As New Scripting.FileSystemObject
    Dim mFile As String
    Dim txtfile As Object
    mFile = "/LogReturns.txt"
    If fso.FileExists(App.Path & mFile) Then
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set txtfile = fso.OpenTextFile(App.Path & "/LogReturns.txt", ForAppending)
        Else
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set txtfile = fso.CreateTextFile(App.Path & "/LogReturns.txt", True)
    End If
    Dim mVar As Integer
    txtfile.WriteLine (" ")
    txtfile.WriteLine ("Receipt Number : " & recReceipt.Fields("ReceiptNum"))
    txtfile.WriteLine ("Member Number  : " & recReceipt.Fields("MembNum"))
    For mVar = 0 To intMoviesReturnCount - 1
        txtfile.WriteLine ("Movie Number(s): " & arrMoviesReturned(mVar))
    Next mVar
    txtfile.WriteLine ("Rec Date & Time: " & recReceipt.Fields("ReceiptDateTime"))
    txtfile.WriteLine ("Amount Payable : " & Format(recReceipt.Fields("Amount"), "$0.00"))
    ' v1.0.159 : 26-Jul-2006 : JPG : Added CashNett value to report
    txtfile.WriteLine ("Cash Nett      : " & Format(recReceipt.Fields("CashNett"), "$0.00"))
    txtfile.WriteLine ("Cash Tendered  : " & Format(recReceipt.Fields("CashTendered"), "$0.00"))
    txtfile.WriteLine ("Eftpos Selected: " & Format(recReceipt.Fields("Eftpos"), "$0.00"))
    txtfile.WriteLine ("Cheque Provided: " & Format(recReceipt.Fields("Cheque"), "$0.00"))
    txtfile.WriteLine ("Credit Card    : " & Format(recReceipt.Fields("CreditCard"), "$0.00"))
    txtfile.WriteLine ("GiftCard Used  : " & Format(recReceipt.Fields("GiftCardUsed"), "$0.00"))
    txtfile.WriteLine ("Discount       : " & Format(recReceipt.Fields("Discount"), "$0.00"))
    txtfile.WriteLine ("Transfer       : " & Format(recReceipt.Fields("DebitMemberBalance"), "$0.00"))
    
    txtfile.WriteLine (" ")
    txtfile.WriteLine ("**************************************")
    txtfile.Close
    Set fso = Nothing

QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 20:34
jojoba201121-May-12 20:34 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 20:51
JohnPayton21-May-12 20:51 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 21:22
jojoba201121-May-12 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.