Click here to Skip to main content
15,867,488 members
Home / Discussions / Database
   

Database

 
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 
AnswerRe: How to get delete/Update row + SQL Pin
JohnPayton22-May-12 12:52
JohnPayton22-May-12 12:52 
QuestionRe: How to get delete/Update row + SQL Pin
jojoba201122-May-12 17:58
jojoba201122-May-12 17:58 
Questiondata base system Pin
sajid ali laghari18-May-12 20:30
sajid ali laghari18-May-12 20:30 
AnswerRe: data base system Pin
Eddy Vluggen19-May-12 0:39
professionalEddy Vluggen19-May-12 0:39 
QuestionHow to sort result if data fields contains both numeric and character value Pin
Rupesh Kumar Swami17-May-12 21:20
Rupesh Kumar Swami17-May-12 21:20 
AnswerRe: How to sort result if data fields contains both numeric and character value Pin
Eddy Vluggen19-May-12 0:32
professionalEddy Vluggen19-May-12 0:32 
QuestionExcel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 10:46
mvePIEBALDconsult17-May-12 10:46 
AnswerRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 11:39
professionalJörgen Andersson17-May-12 11:39 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult17-May-12 14:20
mvePIEBALDconsult17-May-12 14:20 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson17-May-12 20:36
professionalJörgen Andersson17-May-12 20:36 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
PIEBALDconsult21-May-12 8:38
mvePIEBALDconsult21-May-12 8:38 
GeneralRe: Excel, OleDb, ACE, and skipping header rows Pin
Jörgen Andersson21-May-12 9:59
professionalJörgen Andersson21-May-12 9:59 
QuestionSerial number in SQL Pin
draghu17-May-12 0:17
draghu17-May-12 0:17 
AnswerRe: Serial number in SQL Pin
Pablo Aliskevicius17-May-12 2:48
Pablo Aliskevicius17-May-12 2: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.