Reg: Where is My Output? after Pressing the run button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sivadhanekula
    New Member
    • Nov 2008
    • 58

    #16
    Is Append in the open statement correct, if I use this I am only getting the last field data if I have n fields...and If I use Output instead of Append I am getting only the last value of last field...and one more thing if I use the msgbox I was asking to press Ok for every data that is entering to the file...I have 100's of data and I can't press Ok for each time...any solution for that

    the other question was?

    If I write some SQL statement to extract particular number of rows from a table. I need the output with heading of particular row and the data regarding that...

    i.e. suppose if have a table name of Year and with rows from January to febrauary with each month consisting of 100 data "may be string or Integer"

    If My Sql statement SELECT January , March, may FROM Year with January like "Sunday"...then I need the output like

    January March May in different rows with the data under each row from the original table "Year" that has only Sunday in January....it may be more than 40 values and now if the other rows which are March and May have some integer value in it with "," I need the conversion here to convert each and every value of that particular row into "."

    If you have some example program of such kind...it would be really helpfull for me

    Comment

    • EYE4U
      Banned
      New Member
      • Oct 2008
      • 76

      #17
      You need a loop to traverse your recordset for example :
      Code:
      Dim s as String
      
      While rs.EOF = True
      For i = 0 To 4
      s = s & rs.Fields(i)
      Next
      WriteToFile(s)
      rs.MoveNext
      Wend
      WriteToFile is writing data to file.
      This code will traverse all database and will copy the data to the file.

      I m again confused with your question.
      You have executed the query and you have got January, March and May Columns from database.

      Now in which rows you want to show your data...
      Are you using some kind of grid control, list control or what??

      Regards
      ARUZ

      Comment

      • sivadhanekula
        New Member
        • Nov 2008
        • 58

        #18
        Hey...I'm sorry...bit confused with rows and columns...but anyways u got me correct...and regarding the program I am getting an error "Sub or Function not defined". and highlighting at WritetoFile

        Comment

        • EYE4U
          Banned
          New Member
          • Oct 2008
          • 76

          #19
          Function Writetofile, you have to make this function i mean this function will save the data to file....

          If you still didnt understand ask...

          Regards
          ARUZ

          Comment

          • sivadhanekula
            New Member
            • Nov 2008
            • 58

            #20
            Sorry I didn't get you!..

            Comment

            • EYE4U
              Banned
              New Member
              • Oct 2008
              • 76

              #21
              Replace this with your filing code...
              The code which is saving the data to file...

              Comment

              • sivadhanekula
                New Member
                • Nov 2008
                • 58

                #22
                can I write this.writetofil e(s)...instead of writetofile(s). ..is that what you mean...if so I didn't get the output..the screen was blank!

                Comment

                • EYE4U
                  Banned
                  New Member
                  • Oct 2008
                  • 76

                  #23
                  wait wait wait....
                  right now i m in my university i ll upload an example for this problem when i ll get back to home....

                  OK

                  Comment

                  • sivadhanekula
                    New Member
                    • Nov 2008
                    • 58

                    #24
                    Ok...Just for you to remember...I am searching for the code that the extracted data with the help of SQL statement should be saved in file".csv"...an d before doing that if the data has "," in it then it should be converted to "." automaticallay and should save in the file...

                    Thank you very much for your help

                    Comment

                    Working...