RahulV 16 Junior Poster in Training

Hi,
Please tell me how to sign a PDF with a digital signature using VB programming.
Thanks.

RahulV 16 Junior Poster in Training

How to convert a HTML file to PDF file ?

RahulV 16 Junior Poster in Training

Hi,

You actual problem is not the Memory.. it is the logic as to : WHY DO YOU NEED TO LOAD UP SO MUCH DATA IN AN ARRAY OR GRID.......?

there are alternative solutions without having to load such a huge data in Array or Grid...... You need to find such solutions....
Imagine with 20k records you are getting such problem, and then again with time, your data is going to increase.. Find the solution now itself...
Post your actual problem here..

Regards
Veena

Dear Veena,
Then what are the alternatives that you suggest.
My scenario go as follows:
1) I have a really huge data, say records are 7 Lakhs in number
2) I have to calculate subtotals for almost 7 out of 10 columns. Apart from that I have to do several calculations on these columns before presenting them on the grid.

Thanks.

RahulV 16 Junior Poster in Training

Hi Sameer,

If you are using VB6 then u need to use Command object.

Please see the below example
Dim mobjConn As ADODB.Connection
Dim mobjCmd As ADODB.Command
Dim mobjRst As ADODB.Recordset

Set mobjCmd = New ADODB.Command

mobjCmd.CommandType = adCmdStoredProc

mobjCmd.Parameters.Append mobjCmd.CreateParameter("<Param Name> ", <Param Datatype>, <Param Type>, ,<Value>)

mobjCmd.CommandText = strSPName
mobjCmd.Execute

Please let me know if you have any issues

Mahesh B Sayani

Hi,
Sorry if im too late.
But please can you explain, what is "strSPName" and will the "mobjCmd" return a resultset. If yes, then how must the resultset be handled if needed?


Thank you.

RahulV 16 Junior Poster in Training

Hi,
What can I do to open or bring up an already open child form inside a parent MDI form, (that are already visible in the window's menu but beneath other child forms) when their respective menu buttons are clicked once again?

Is there any collection or array to access the child form's captions or names inside the window menu?

RahulV 16 Junior Poster in Training

HI Friend,
I knew that already, ... but was just looking out for alternatives.
But now i hope there is no other alternative.
Thank you again.

RahulV 16 Junior Poster in Training

Hi,
I've a really huge recordset having lacks of records. For some reasons I've to take all the records into an array (using loop) to do some processing and then put it into a grid.
Now since the recordset is huge the memory is not able to handle the array and giving out errors.
When I set the upper bound of the array manually to almost 18000 to 19000 It works fine. But when the real upper bound of the array is set, then it gives out error and not all records are shown.

The windows also gives out message that says "Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help."

I am using an array of datatype 'Variant'
What is an alternative?

RahulV 16 Junior Poster in Training

I created a ListView, but now the ListItems in the ListView is editable, but I want to lock the editing for the ListView.
How is that possible?

RahulV 16 Junior Poster in Training

Please answer me...

RahulV 16 Junior Poster in Training

Hi,
What all are the ways to synchronize two SQL databases?
If there is a way to do it via query or code, what is that query/code?
Please help.
Thank you.

RahulV 16 Junior Poster in Training

Can we use any C# or VB.NET controls or components in VB 6.0?
or
Is there any place where we can get free controls or components for VB 6.0?

RahulV 16 Junior Poster in Training

Hi Friends,
Can there be a query that will SELECT fields of a table and group a column (say "CustomerID") and show all its rows along with its subtotals and then its Grandtotal in the result returned?

For Example,

CustID Items Cost ExtraCharges
---------------------------------------------------------------------------------------
A1 Cofee 15.00 2.00
A1 Tea 10.00 2.00
Subtotal: 25.00 4.00
B1 Cofee 24.00 10.00
B1 Tea 29.00 11.00
Subtotal: 53.00 21.00
GrandTotal: 78.00 25.00

RahulV 16 Junior Poster in Training

Thanks QVeen72,
Hope this works. Let me try this and I will reply.
THANKS

RahulV 16 Junior Poster in Training

Hey,
seems it possible to use more than one column in ListView control, with checkboxes...

Look at http://www.daniweb.com/forums/thread254613.html

Great!
Another one for my collection...

Dear Friend,
This works good.
But when the number of records are huge say, in units of lakhs ... then it take a lot of time to get display.
I think using any sort of bound or unbound grids would be better under such situations.
Hence, can we do similar stuff using grids?
Lets discuss ...
Thank you.

RahulV 16 Junior Poster in Training

Thanks vipin saxena,
I have been trying on this, now i understand where i had missed.

Thanks !

RahulV 16 Junior Poster in Training

Hi,
I am working with ListView. How can a ListView have multiple columns and also have CheckBox at the same time? (preferably in its View property set as "Report")

RahulV 16 Junior Poster in Training

Hi vb5prgmr,

Actually Disconnected Datasets are once, wherein you actually connect recordset to the database table (as usual normal procedure),
and then disconnect the active connection of the recordset by setting it to nothing.. Again a database table required...

binding array/system table/datatable to datagrid can be easily done in VB.net, but not sure of vb6...

I still feel, FlexGrid is most appropriate control in such situations...

Regards
Veena

I have some thoughts,...
1) Recordsets are multi-dimensional Array/similar to multi-dimensional array containing collection of records
2) If Yes, then why cant arrays b bound to DBGrid/DataGrid, the way we usually do with Recordsets?
3) Also, can we insert/append a multi-dimensional array to any RecordSet?

If Im wrong pls correct me and/or share your thoughts.

Thank you.

RahulV 16 Junior Poster in Training

You can try this:
(you'll need two images, one for checked, other for no checked boxes)

Private Sub MSFlexGrid1_Click()
 
  With MSFlexGrid1
    If Val(.TextMatrix(.Row, 0)) = 0 Then
      .TextMatrix(.Row, 0) = 1
      .Col = 0
      Set .CellPicture = LoadPicture("C:\CHECK.BMP")
    Else
      .TextMatrix(.Row, 0) = 0
      .Col = 0
      Set .CellPicture = LoadPicture("C:\UNCHECK.BMP")
    End If
  End With

End Sub

If someone knows how to implement a REAL checkbox in msflexgrid, please help here... This would be very interesting...


Good luck!
Sidnei

Thankz sidnei,
But is there any better/practical alternative? may be any control that can do the work?

RahulV 16 Junior Poster in Training

The ListView control, found in common controls 6.0, has the ability to display checkboxes...

Good Luck

Dear vb5prgrmr,
I've tried with ListView but it shows only 1 column if checkbox is displayed.
Do any of you know the way to display multiple columns in ListView with the first column displaying checkboxes?
Thanks

RahulV 16 Junior Poster in Training

The above attached image shows a sample of the type of data grid I require.
Kindly suggest and help. thanks.

RahulV 16 Junior Poster in Training

URGENT
Hi FRIENDS,
Pls help me with this.
I need to display a form/dialog with any grid which contains only checkboxes in the first column and data in the other two columns.
And my goal is to retrieve ONLY the data from the columns where the checkboxes are checked.

pls view the jpg image attached here to get an exact idea of what the form must look like.

Kindly also provide me a sample code too.

THANKS!!!

RahulV 16 Junior Poster in Training

Using FlexGrid's TextMatrix property I could insert data into each cell but how can the similar be done in DataGrid/DBGrid ?

But I think using DataGrid/DBGrid requires DataSource, RecordSet, or DataMember and complete the connection. Is that the case?

RahulV 16 Junior Poster in Training

Yes Sir, I know how to populate data from DB to DataGrid/DBGrid but I'm trying to create a bi-dimensional array which will pass data to the grids but Im unsuccessfull so far.
Hence pls help.

RahulV 16 Junior Poster in Training

Kindly tell me how can I insert data from a bi-dimensional array ex. array1(10,10) to a DataGrid/DBGrid and visa-versa.
Please explain with a sample source code.

RahulV 16 Junior Poster in Training

Thanks that worked well.

RahulV 16 Junior Poster in Training

Hi, Environment.SpecialFolder , this returns a enum without having a public GetEnumerator(); ,
, can u tell me how to access the values like by using foreach statement?

RahulV 16 Junior Poster in Training

Hi,
What is the units (e.g bytes or kb or mb etc) in which HttpWebResponse.ContentLength; returns its value?
Also that of Stream.Length; I'm using C#.net.
Thank you.

[all ur help is highly appreciated]

RahulV 16 Junior Poster in Training

Oh how contraire akshits...

See...

http://www.tek-tips.com/viewthread.cfm?qid=1095460

Good Luck

I was wondering if there is some other way, like by checking the Title of the forms open or something.
Pls tell me if im wrong.
Thank you.

RahulV 16 Junior Poster in Training

What kind of access are you using? ADO, ADODC, DAO, DAO ODBCDirect, RDO?, What version of Access? If ADO, are you using a DSN?

I use ADO without DSN.

RahulV 16 Junior Poster in Training

Hi,
I open notepads and other applications using shell during runtime. But now I want to check out whether these applications are open or not. How am I supposed to do that?

RahulV 16 Junior Poster in Training

Hi,
I have created a project using MS Access db its working fine except one. A dialogue box opens up when running its exe, saying "Please enter MS JET OLE DB initialization information."
But I have provided all the DB connection information and other related information at runtime during initialization of the first form itself.

What am i supposed to do to correct it?
Please help.

RahulV 16 Junior Poster in Training

I know its a bit hard to perform

RahulV 16 Junior Poster in Training

Hi,
Consider there are 3 tables as following:

Table1
=============================================================================================
| SerialNum | Date | B | C | D | Table2Number | Table2_Amount | Table3Number | Table3_Amount|
=============================================================================================
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
=============================================================================================

Table2
=============================================
| SerialNum | Date | B | C | D | E | Amount |
=============================================
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
=============================================

Table3
=============================================
| SerialNum | Date | B | C | D | E | Amount |
=============================================
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
=============================================

Primary keys for each table:
SerialNum field is primary key for the respective tables.

Foreign keys in Table1:
Table2Number :::> Taken from primary key of Table2
Table2_Amount :::> Taken from Amount field of Table2
Table3Number :::> Taken from primary key of Table3
Table3_Amount …

RahulV 16 Junior Poster in Training

You can put a password on the database file so you can't just double click to open it.
Then you would provide the password in your Connection string in VB6 (when connecting to the database) using PWD:flibble (if your password is flibble, that is...)

I know that already, but is there any other way or idea ?

RahulV 16 Junior Poster in Training

Hi,
In the VB projects that use Access Databases, its found that the user is able to access the database directly (manually) ie by reaching the file and double clicking it open.
But, what all can i do to prevent the user from directly accessing and using the database? What are the options to do it?

RahulV 16 Junior Poster in Training

You're a part of DANI.WEB.

Try that dependency walker. You just run your program inside of the Dependency Walker Program and it will output exactly what happens and where.

The actual program name is called Depends.exe Open your executable. Start Profiling (F7) Save the results. That will be a file with extension .dwi (Dependency Walker Information?). Post that file and that should help out quite a bit.

But im right now coding my project and as far as ive tried it, it gives some error on running a ".vbp" file
Please Wait till at least i write a sample prog exe.

RahulV 16 Junior Poster in Training

Let me try to help in this case, (Since i got the same doubt),

See, there is a DataEnvironment, it has a Connection object and both's required properties set at design time. There is also a Command1 which has a SQL string command which is set during design time.

Now,
At runtime I want to change the Command1's SQL string, but since its a constant value it give an error, how to solve it?

RahulV 16 Junior Poster in Training

I found lots of people asking the same question.
But only to find no answers to correct it.

WE NEED TO SOLVE THIS AND SHOW THE PEOPLE OUT THERE, WHAT DANIWEB.COM MEMBERS ARE MADE OF !

RahulV 16 Junior Poster in Training

Sounds like you have an ActiveX control that was updated or unregistered by VS2008.

You can try this tool to isolate the problem. It should give you the exact answer.
http://www.dependencywalker.com/

Or just try reinstalling VB6.

I had already tried Reintsalling, but that did not work!

RahulV 16 Junior Poster in Training

URGENT
Hi,
Ive found that earlier when i used DataControl in any of my Forms it did not give any problem worked fine.
But after sometime when i started to run those Forms it gave me an error message (to debug) of "Visual Studio 2008" (Just-In-Time Debugger).
I felt that it began after installing Visual Studio 2008 on the PC.
So i uninstalled it but still after doing so it give me error message with title as "Visual Studio Just-In-Time" description as "An unhandled win32 exception occured in VB6.EXE[6048]. ..............."

When i click OK (the only button available) the project closes along with the design mode without even able to save.

so wht shold i do now to solve this. My Project has badly effected due to this. Please help me.

Thank you,
Waiting for a response....

RahulV 16 Junior Poster in Training
Private Declare Function Function_Name Lib "user32" () As Datatype

I've found such lines used in many VB6 projects and tutorials.
What is it? What actually is this used for? Are there more such function? How to find out more such function/properties?
A detail explanation will be helpful and highly appreciated.
Thank you.

(Is it calling read-only or some library functions or properties?)

RahulV 16 Junior Poster in Training

Probably the easiest way to do what you want is to use a Browser control on your form and open the PDF file in the browser - Browser1.Navigate PDFFile$ - works like a charm and you're not tied to a particular version of Acrobat Reader.

Thanks that helped in selecting the required text.
But still im not able to put it in a variable or access the text via code.

You know how to do that?

RahulV 16 Junior Poster in Training

Hi,
How can i open a PDF file in Form instead of using a shell to open it?
Also i want to select some text in the opened PDF file and store it in a variable.

Thank you.

RahulV 16 Junior Poster in Training

Do you think he is looking to avoid executing it, at all? I didn't even consider that's what he was asking. He said stop execution and I saw that exec() continued in an infinite loop, so I assumed he was looking for a way to halt execution at a point.

We'll see what he says, I guess.

Yes you are right.

RahulV 16 Junior Poster in Training

You're asking to make code do something different without changing it. It's kind of difficult to do.

I would say, if you wanted to halt execution on the sub-routine before it completes without changing the code in the sub-routine, then you'd have to call it asynchronously in a new thread and have your original thread halt execution when a condition is met (like Labell equalling a specific value) by killing your new thread prematurely. Would that cause a memory leak? Almost definitely, but, it meets your criteria. Besides that, I can't think of a way to do what you're describing. I would highly, highly recommend that you don't do that, though.

I'd have to ask why you're calling a sub-routine that goes into an infinite loop, anyway. I'd also have to ask why you insist that it can't be changed to suit your needs.

Thank you,
I too had considered the Thread concept but I dont know how to implement Thread in VB 6.

Can you help me how to create and implement Threads? I think that would work.

Any other techniques to perform the required would be highly appreciated.

RahulV 16 Junior Poster in Training

Consider this VB6 source code

Public bc As Boolean
Dim x As Long

Private Sub Command1_Click()
     If bc Then
          MsgBox x
          Exit Sub
     Else
          Call exec
     End If
End Sub

Private Sub Command2_Click()
     bc = True
     Call Command1_Click
End Sub

Private Sub Form_Load()
     bc = False
End Sub

Public Sub exec()
     While 1 = 1
          x = x + 10
          Label1 = x
          DoEvents
     Wend
End Sub

now here, i want to stop the execution of a sub-procedure Public Sub exec() which is called by another sub-procedure Private Sub Command1_Click() but without changing or adding any code into Public Sub exec().

Does anyone have an answer?
How to do it?

RahulV 16 Junior Poster in Training

ONCE AGAIN REPEATING THE PROBLEM

Consider this code:

Public bc As Boolean
Dim x As Long

Private Sub Command1_Click()
     If bc Then
          MsgBox x
          GoTo EndHere
     Else
          Call exec
     End If
EndHere:
End Sub

Private Sub Command2_Click()
     bc = True
     Call Command1_Click
End Sub

Private Sub Form_Load()
     bc = False
End Sub

Public Sub exec()
     While 1 = 1
          x = x + 10
          Label1 = x
          DoEvents
     Wend
End Sub

now here, i want to stop the execution of a sub-procedure Public Sub exec() which is called by another sub-procedure Private Sub Command1_Click() but without changing or adding any code into Public Sub exec().
even after applying all ur helps it did not work as needed. But all your help was valuable.

How to do it?

(Forgive me for not providing the code earlier.)

RahulV 16 Junior Poster in Training

Not end sub.... exit sub...

O!
i'm terribly sorry for that!!
(What's happening to me these days? ...... might be that im in high tension to know more!!!)
once again i'm sorry!!

Pls help me with the main problem!! that we are discussing here.

RahulV 16 Junior Poster in Training

It's a very bad practice to use goto in programming. It is strongly frowned upon by professional programmers, and actually forbidden in business code. Instead, you can use "exit sub" to replace that goto statement. Even that (since it is just a single if statement and nothing else) isn't even necessary, as the code will simply end once the if statement is completed.

But if i replace the GoTo statement with End Sub, it give a compiler error "Block If without End If". So i had to use the GoTo statement.

Now pls can anyone help me in solving the basic problem being discussed here?

PLEASE HELP !!! :'(

RahulV 16 Junior Poster in Training

Consider this code:

Public bc As Boolean
Dim x As Long

Private Sub Command1_Click()
     If bc Then
          MsgBox x
          GoTo EndHere
     Else
          Call exec
     End If
EndHere:
End Sub

Private Sub Command2_Click()
     bc = True
     Call Command1_Click
End Sub

Private Sub Form_Load()
     bc = False
End Sub

Public Sub exec()
     While 1 = 1
          x = x + 10
          Label1 = x
          DoEvents
     Wend
End Sub

now here, i want to stop the execution of a sub-procedure Public Sub exec() which is called by another sub-procedure Private Sub Command1_Click() but without changing or adding any code into Public Sub exec().
even after applying all ur helps it did not work as needed. But all your help was valuable.

How to do it?

(Forgive me for not providing the code earlier.)