Click here to Skip to main content
15,504,830 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to get delete/Update row + SQL Pin
Mycroft Holmes20-May-12 13:55
professionalMycroft Holmes20-May-12 13:55 
AnswerRe: How to get delete/Update row + SQL Pin
Corporal Agarn21-May-12 1:49
professionalCorporal Agarn21-May-12 1:49 
GeneralRe: How to get delete/Update row + SQL Pin
Eddy Vluggen21-May-12 4:45
professionalEddy Vluggen21-May-12 4:45 
GeneralRe: How to get delete/Update row + SQL Pin
Corporal Agarn21-May-12 4:51
professionalCorporal Agarn21-May-12 4:51 
GeneralRe: How to get delete/Update row + SQL Pin
Eddy Vluggen21-May-12 5:27
professionalEddy Vluggen21-May-12 5:27 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 14:04
JohnPayton21-May-12 14:04 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 21:08
jojoba201121-May-12 21:08 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 21:25
JohnPayton21-May-12 21: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 21:34
jojoba201121-May-12 21:34 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton21-May-12 21:51
JohnPayton21-May-12 21:51 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201121-May-12 22:22
jojoba201121-May-12 22:22 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton22-May-12 13:52
JohnPayton22-May-12 13:52 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201122-May-12 18:58
jojoba201122-May-12 18:58 
Questiondata base system Pin
sajid ali laghari18-May-12 21:30
sajid ali laghari18-May-12 21:30 
AnswerRe: data base system Pin
Eddy Vluggen19-May-12 1:39
professionalEddy Vluggen19-May-12 1:39 
QuestionHow to sort result if data fields contains both numeric and character value Pin
Rupesh Kumar Swami17-May-12 22:20
Rupesh Kumar Swami17-May-12 22:20 
AnswerRe: How to sort result if data fields contains both numeric and character value Pin
Eddy Vluggen19-May-12 1:32
professionalEddy Vluggen19-May-12 1:32 
QuestionExcel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 11:46
professionalPIEBALDconsult17-May-12 11:46 
AnswerRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 12:39
professionalJörgen Andersson17-May-12 12:39 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 15:20
professionalPIEBALDconsult17-May-12 15:20 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 21:36
professionalJörgen Andersson17-May-12 21:36 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult21-May-12 9:38
professionalPIEBALDconsult21-May-12 9:38 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson21-May-12 10:59
professionalJörgen Andersson21-May-12 10:59 
QuestionSerial number in SQL Pin
draghu17-May-12 1:17
draghu17-May-12 1:17 
AnswerRe: Serial number in SQL Pin
Pablo Aliskevicius17-May-12 3:48
Pablo Aliskevicius17-May-12 3:48 

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.