|
I'm trying to write some code (VB.NET) to dump the symbol information from DLL's or EXE's into XML. I've installed the debugging tools for windows, and tried using the dbghelp.dll API's but for some reason I can't reference dbghelp.dll in my project. So I tried reading the data into a pdb file using symhlp which works, but now I can't find a definition of the pdb file format anywhere so I can't convert to XML.... Does anyone have any experience doing this sort of thing, or code they could share?
Stuart
|
|
|
|
|
I want to use vbscript to fetch formula stored in database datatype is string which in turn will check the variables names in the formula field and get the values from another table and replace them this is then to be executed to get the results. It is payroll app.
The user enters in formula table "Basic + Hra" fetch this from table then check in values table Basic = 2500 and Hra = 1000. fetch this values then replace the variables and get the result
2500 + 1000 = 3500.
I am using VB 6.0 and developing payroll Application using Access. It is not a web based application
Prashant Nemane
|
|
|
|
|
Why Do you want to use script. Why not just use VB? You could use ADO in VB.
|
|
|
|
|
Dear Sir / Madam
Can you please tell me how to do it.
I am a beginer.
prashantnemane@rediffmail.com
Regards
Prashant Nemane
|
|
|
|
|
It Is Sir.
Here is a quick sample. Best to read up on ADO. it would be the same in script except set the Objects Set recordSet = CreateObject("ADODB.Recordset") and Set connectionObj = CreateObject("ADODB.Connection")
This assumes ODBC settings for DSN
Don't forget to reference ADODB in project
Public Const CURSOR_TYPE = 3<br />
Public Const LOCK_TYPE= 3<br />
<br />
Dim connectionString as string<br />
Dim sql as string<br />
Dim connectionObj As New ADODB.Connection()<br />
Dim recordSet As New ADODB.Recordset()<br />
<br />
connectionString = "dsn=DSN;uid=USER_ID;pwd=USER_PASSWORD;database=DATABASE_NAME<br />
sql = "SELECT name FROM sysobjects"<br />
<br />
connectionObj.Open(connectionString) <br />
<br />
'There are Many ways to access an retrieve data this is just one sample<br />
<br />
recordSet = connectionObj.Execute(sql)<br />
OR<br />
recordSet.Open(sql, connectionObj, CURSOR_TYPE, LOCK_TYPE)<br />
<br />
'Loop thru Record set (row) I believe this is only forward reading<br />
<br />
With recordSet<br />
Do Until .EOF<br />
<br />
'Get the COlumns in the Row and do something set to varilable, call other routine, etc..<br />
.Fields("name").Value ' this is the column name in the select statment (sql)<br />
OR <br />
.Fields.Item(0) ' also the column name, specify the column index number 0 to however many columns<br />
<br />
.MoveNext() ' go to next record<br />
Loop<br />
End With
Good Luck
|
|
|
|
|
how do u specifically name a column in the data grid?
right now the data i display in a data grid, comes with those column names, which are the names of various fields in my database.
i want to name them differently!
how do u do that?
|
|
|
|
|
You can specify the column name through HeaderText property like this.
Me.DataGrid1.TableStyles(0).GridColumnStyles(0).HeaderText = "MyColumn"
|
|
|
|
|
Or you could just format you sql statement differently and give each column an alias.
Select id as 'ID', name as 'User Name' .....
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|
|
i am calling a SQL stored procedure from VB
i want to be able to call the stored procedure asynchronously...
i've tried different param values but the code gets called only synchronously...
below is the sample code that i am using...
Dim m_adoConn As new ADODB.Connection<br />
m_adoConn.Open "DSN=ConnectionNameHere"<br />
<br />
Dim com As ADODB.Command<br />
Set com = New ADODB.Command<br />
<br />
Dim rs As New ADODB.Recordset<br />
<br />
com.ActiveConnection = m_adoConn<br />
com.CommandType = adCmdStoredProc<br />
com.CommandText = "PopulateGroup"<br />
<br />
com.Parameters.Append com.CreateParameter("@sTableName", adWChar, adParamInput, 15, Null)<br />
com.Parameters("@sTableName").Value = "abcd"<br />
<br />
Set rs = com.Execute<br />
Debug.Print rs(0)
any help regarding this will greatly appreciated
Thanks
|
|
|
|
|
You're going to have to wrap the SQL stuff in some type of asynchronous method call. See this article[^] on CodeProject or a different method in this article[^] on MSDN.
EDIT:
Whoops! Your going to have to use VB.NET to do this. I can't find anything on doing it in VB6!
RageInTheMachine9532
|
|
|
|
|
thanks a lot man...appreciate your help
|
|
|
|
|
How to get the title of the IE explorer
Every is Illusion
|
|
|
|
|
NEO Whoa. Deja vu.
TRINITY What did you just say?
NEO Nothing. Just had a little deja vu.
TRINITY What happened? What did you see?
NEO A black cat went past us and then I saw another that looked just like it.
TRINITY How much like it? Was it the same cat?
NEO It might have been. I'm not sure. What is it?
TRINITY A deja vu is usually a glitch in the Matrix. It happens when they change something.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
|
|
|
|
|
So which pill did you take?
Edbert P.
Sydney, Australia.
|
|
|
|
|
How to get the title of the IE explorer
|
|
|
|
|
i am letting some data appear in a data grid.
and i want that each row should have a check box with it.so that when i select a check box, its corresponding data in the data grid should be saved in a table in a database in SQL server.
for example:
suppose i have a list of college courses with their credit hours displayed in a datagrid.that would require a grid of n rows and 2 columns.
now suppose i want to select a number of courses, by checking their corresponding checkboxes.so that the selected courses and their credit hours are sent back to a database.
i dont want to know the database part, just how to retrieve the checked data from the data grid
|
|
|
|
|
You can use the Item property of DataGrid to retrieve the checked data.
Me.DataGrid1.Item(i, j) will gives the data in the i'th row and j'th column.
|
|
|
|
|
whats me? in Me.datagrid1.Item(i,j) ?
i believe its the ID of the check box?
|
|
|
|
|
Me is nothing but the Form which contains the DataGrid. datagrid1 is the Datagrid object.
|
|
|
|
|
This is the code that I have (just learning)
<br />
If OpenFileDialog1.ShowDialog = DialogResult.OK Then<br />
Dim bitmap As New Bitmap(OpenFileDialog1.FileName)<br />
Dim gr As Graphics = Me.CreateGraphics<br />
gr.DrawImage(bitmap, 0, 0)<br />
bitmap.Dispose()<br />
gr.Dispose()<br />
End If<br />
the file open box work fine, but the picture does not appear. I am working from an example in a book, and that is what they have. What is it that is missing to make the bitmap visible in the form?
Thanks for the help.
|
|
|
|
|
Don't the Dispose calls mean you're deleting the bitmap ? Have you traced through the code ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I did try to remove the dispose method, but it still doesn't work. As for tracing through, do you mean just step through? I haven't done that because there isn't many lines of code, and it is copied from the book that I am reading. Unless tracing is totally different, in which case no
|
|
|
|
|
Were you to step through, you will be able to see if the Bitmap is loading properly, if the Graphics object is being created OK, etc.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
ya it seems that everything is being created just fine. Once again I remove the dispose methods, just in case, but still nothing. I tried this on a computer at work as well and I got the nothing displayed there as well
|
|
|
|
|
i did the other examples in the book, and this is the only one that I cannot seem to get to work, and this is really the only one that I need to get to work.
Any help is appreciated. Thanks
|
|
|
|