FarPoint Forums

The FarPoint Message Boards
Welcome to FarPoint Forums Sign in | Join | Help
in Search

Save Huge Records vb6.0 to sql server2000

Last post 11-26-2008, 9:11 AM by scotts. 4 replies.
Sort Posts: Previous Next
  •  11-24-2008, 5:38 AM 71965

    Save Huge Records vb6.0 to sql server2000

    Hi,

    I have a couple of questions.
    I am using vb6.0, spread 7.0 and Sql

    Am Newbie to Spread7.0

    1. I import  data from excel to spread and  make some changes then save to sql server 2000.
    The data may be around 20,000. After Modify some data how to save in table.I need Performance should be good. If i use gettext and save by each cell means will get snail slow. How to achieve this.

    2. I would like to save only modified row, at that time, how can i know which row is modified.
    Ex. I fetch data from sql server 2000. make some changes in the row 2, 10,50,500,700 resp. and need to save..i want to save modified row only. In this situation how to save only the particular row data.

    Can you help me how to Bind data or Unbound data, retrive and save a huge records, say for example 20000? Iam struggling in these two areas. Help Me.

    Thanks,
    SawMeOnline

  •  11-24-2008, 7:20 AM 71970 in reply to 71965

    Re: Save Huge Records vb6.0 to sql server2000

    SawMeOnline,

    1) You would need to work with the Spread unbound in this case to load the Excel file into the Spread. Once you have the data, you would need to loop through the rows one at a time. There would not be a best performance way to get the data out of the Spread in each row and create a record to pass to the database through a SQL command.

    2) If you are bound, then there is nothing to do, when you make a change to a cell in a row and you click off the row, it is automatically saved back to the database at that time. If you are not bound, you would need to use an event like the Change event to notify you of a change. Then, you can keep a global 'log' variable to keep track of the rows that have been changed.


    Scott S.
    FarPoint Technologies, Inc.
  •  11-25-2008, 9:12 PM 72034 in reply to 71970

    Re: Save Huge Records vb6.0 to sql server2000

    Hi Scott,

    Thanks! I finish this process.

    Sawmeonline 

     

  •  11-26-2008, 5:09 AM 72047 in reply to 71970

    Re: Save Huge Records vb6.0 to sql server2000

    Hi, 

    Thanks Scott!

    I got some idea and complete particular row save in the total grid.
    I am using unbound data method.
    Get value cell by cell and save method is slow.Is it Possible, using getarray method to fetch data from spread and save that array value in table [sql server 2000].If it is possible means, how to achieve this?

    Thanx,
    Sawmeonline

  •  11-26-2008, 9:11 AM 72061 in reply to 72047

    Re: Save Huge Records vb6.0 to sql server2000

    Sawmeonline,

    This depends on how you can save the records. The only way I know to write records to a database from VB is to write a SQL command that you fill fields with values. I am not sure of a way to pass a tab delimited string or array of values to a command to update a database. If you can do this with ADO, then you can use other methods to get the data from the Spread rather than going cell by cell.


    Scott S.
    FarPoint Technologies, Inc.
View as RSS news feed in XML
     FarPoint Forums Home