No actually it is general error not scripting error.Inside database by fire query it shows all data in table but same query in qlikview stop after loading 4 cr data ? Should I apply any logic inside script like row no with less than equal to max value ?
At first take a look on the RAM consumption of your machine during the loading (strange errors could occur if there isn't enough RAM available). The next look should go to the used database-driver if it could be replaced with another to exclude any failures or limitations on this side.
A further point are possible restrictions on the database maybe there are limitations how many records could be pulled at one time or there might be any timeouts - in this case you could split the loading into smaller slices - in general you should consider to use incremental approaches to avoid such heavy data-loads and to load only new and/or changed data.
If nothing of them is successful it might be helpful to include recno() and rowno() within the load to be able to research the matter on a record-level to find the exact break-point and with them quite probably also the reason.