|
devvvy wrote: SomeMatlabUtil.dll was loaded, but the DllRegisterServer entry point was not found.
Sorry to state the obvious but if the entry point is not found in the dll then it cannot be registered. I'm not a COM expert so I'm not sure offhand how you get round this, but I'm reasonably certain you can link to unregistered COM dlls.
It's time for a new signature.
|
|
|
|
|
yes very obvious, so how to check if we're missing an attrib to decorate entry point or what? obvious fix/cause?
dev
|
|
|
|
|
As I said, I'm not a COM expert but I would guess you need to look at the source code.
It's time for a new signature.
|
|
|
|
|
Use
Register
[FrameworkPath]\REGASM SomeMatlabUtil.dll /tlb SomeMatlabUtil.tlb
Unregister
[FrameworkPath]\REGASM /unregister SomeMatlabUtil.dll /tlb SomeMatlabUtil.tlb
|
|
|
|
|
Thanks very much guys
dev
|
|
|
|
|
I use to program in VB 6 for many years. I am now trying to move to VB 2010. I want to be able to connect to an ACCESS database, Add a record, delete a record and edit a record with code (no wizards or other controls). Up to this point a can do all this.
The next step is to be able to find a record based on value for any field. In VB6, I use to use a "find" method to find the first record with that search criteria. I could also find the "next" record for that criteria. (This is to find a record, not to filter the table.)
My code so far is:(I have a MDI form with a child form and then a module where I keep my functions.)
In Form:
Private Sub frmDataEntry_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Folder As String
Folder = My.Application.Info.DirectoryPath
MyDatabaseFile = Folder & "\Data\PartInfo.mdb"
mdiMain.Panel1.Text = "My Data Base File: " & MyDatabaseFile
MySQLPart = "SELECT tblPartMaster.PartMaster_ID, tblPartMaster.PartNo, tblPartMaster.Description, " & _
"tblPartMaster.OEM, tblPartMaster.OEMPartNo, tblPartMaster.LastUsed, tblPartMaster.CurrentCost, " & _
"tblPartMaster.DrawingNo, tblPartMaster.Remarks " & _
"FROM(tblPartMaster) " & _
"ORDER BY tblPartMaster.PartNo;"
DataConnect() ' calls a sub in myFunctions module.
DisableText()
ShowCurrentRecord()
End Sub
Public Sub DataConnect()
'*******************************************************
'*** Make Connection
'*******************************************************
MyConnection.ConnectionString = _
"PROVIDER=MSDataShape;" & _
"Data PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & MyDatabaseFile & ";" & _
"Persist Security " & _
"Info=False"
MyConnection.Open()
MyDataAdapter = New OleDb.OleDbDataAdapter(MySQLPart, MyConnection)
MyCommandBuilder = New OleDb.OleDbCommandBuilder(MyDataAdapter)
MyTable_PartInfo.Reset()
MyDataAdapter.Fill(MyTable_PartInfo)
MyTable_PartInfo.PrimaryKey = New DataColumn() {MyTable_PartInfo.Columns("PartMaster_ID")}
MyTable_PartInfo.Columns("PartMaster_ID").AutoIncrement = True
End Sub
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
If MyRowPosition < (MyTable_PartInfo.Rows.Count - 1) Then
MyRowPosition = MyRowPosition + 1
End If
ShowCurrentRecord()
End Sub
' to add a record
Private Sub btnControl6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnControl6.Click
Dim DataSetNewRow As DataRow = MyTable_PartInfo.NewRow
DataSetNewRow("PartNo") = txtDataEntry1.Text
DataSetNewRow("Description") = txtDataEntry2.Text
DataSetNewRow("OEM") = txtDataEntry3.Text
DataSetNewRow("OEMPartNo") = txtDataEntry4.Text
If IsDate(txtDataEntry5.Text) Then
DataSetNewRow("LastUsed") = txtDataEntry5.Text
Else
DataSetNewRow("LastUsed") = "01/01/1990"
End If
If IsNumeric(txtDataEntry6.Text) Then
DataSetNewRow("CurrentCost") = txtDataEntry5.Text
Else
DataSetNewRow("CurrentCost") = 0
End If
DataSetNewRow("DrawingNo") = txtDataEntry7.Text
DataSetNewRow("Remarks") = txtDataEntry8.Text
MyTable_PartInfo.Rows.Add(DataSetNewRow)
MyDataAdapter.Update(MyTable_PartInfo)
MsgBox("New Record added to the Database")
DisableText()
MyRowPosition = MyTable_PartInfo.Rows.Count - 1
ShowButtons()
ShowCurrentRecord()
End Sub
How to go to a record based on a search criteria. I want to have a textbox where I can type in a "part number" and a "Find" button. So I type in a number and click the button and the form should display the record.
|
|
|
|
|
You can either requery the database and add a WHERE clause to your SELECT statement, or you can use the .Select or .Filter methods of your DataTable object to get the records from the already retrieved set you have.
|
|
|
|
|
Thank you for your time Dave. I want to keep the table as it is and just be able to "navigate" to the record that meets the requirement. So I don't want to requery the database. I tried "select" but I am still doing something wrong: I have
Private Sub btnPartNo2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPartNo2.Click
MyTable_PartInfo.Select("[PartNo]='" & txtPartNo.Text & "'")
ShowCurrentRecord()
End Sub
but it is not working
|
|
|
|
|
I don't know what the column type of [PartNo] is, but it looks like you're saying it's a string of some kind. In which case, your Select expression may need to look more like:
MyTable_PartInfo.Select(String.Format("PartNo LIKE '*{0}*'", txtPartNo.Text))
|
|
|
|
|
Hi all,
even small problems can drive you crazy sometimes... so does a regular expression with me.
From a text file like the sample given below the following regular expression extracts the 'Grp' group well, but the 'Entr' group would always be empty. Maybe someone else can see where my error is? Actually, as a final result I'd also like to extract the entrie's name and its value (i.e. befor/after the "=") into different groups. Any regex experts around?
Dim regex = New Regex("\[(?<Grp>.*)\](?<Entr>.*) is supposed to give me back the groups and entries in an ini-file like structure, no?
' Sample
[Track]
Latitude=N047° 25' 53.4256"
Longitude=W122° 18' 28.7933"
Altitude=+000432.00
[Options]
Titles=False
Sound=True
Pause=False Thank you very much in advance,
Michael
|
|
|
|
|
Pickup this[^] little tool. It's got a bunch of samples in it, including a few that do this very thing.
|
|
|
|
|
Thank you, Dave, for taking some time. I've been creating what I sent using Expresso, use it whenever it comes to Regular Expressions and I have to say I really love it! But even after trying many different possibilities and options in Expresso with its Builder, the RegEx I sent leads to an empty "Entr" group. It must be a silly something that I just can't see or comprehend...
|
|
|
|
|
You didn't to look under the Expression Library tab and see the Key=Value pair example, did you?
|
|
|
|
|
Thanks again, Dave.
Yes, I did look at that, and the key-value-pair regex works perfectly well. This would have been the second step that I mentioned in my question - I just wanted to reduce my question to the main point... If I could make the "Entr" group in my question have any content at all, I could easily replace it with the key-value-pair regex.
The problem is that I get either the "Grp" group (alone) or the key-value-pair (alone) matched. It seems that the \[ and \] literals do something out of (my ) control, which I also can't find in the reference. The funny thing is that the full match that the regex in my question finds only contains the first group with the surrounding [] brackets, so that the second group must be empty. Did you check it out in Expresso?
The full regex including the key-value-pair would be:
\[(?<Grp>.*)\].(?<Keyword>\w+)\s*=\s*(?<Value>.*)((?=\W$)|\z) Result:
- I get all the groups matched from my file example if I only test the first part (including the \] literal). The "Entr" group has the CR then, but not the following lines (i.e. none of the key-value-pairs)
- I get all the key-value-pairs matched if I only run a match on the second part, beginning from the Keyword-group.
Between the first and the second part of the regex is only a CR existing, which I try to match with the "." (=any character / once). But I get no match at all if I run the match like this.
|
|
|
|
|
for (regex in regexes_looked_at)
coder.sanity--;
More seriously, why not look at any of the many inifile parser classes available? There are even some here on CP. If you don't like any of them, Google will probably get you *waaaay* too many.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Thank you, Peter, for your time. I was considering using an inifile parser first, but didn't want to blow my little application up with many third party classes - also expecting the regex to be done in a minute... That's the way development goes sometimes, right? BTW did you see the other error in it which I was asking for??? After struggling for more than an hour it became a challenge to brighten up my blindness now, even if I might decide to use an inifile parser then.
|
|
|
|
|
FYI: CP now has a regular expressions forum.
|
|
|
|
|
Happy day ! I could resolve a part of my regex task in Expresso.
For the record and other users: Obviously ".*" for "any character / any number of repetitions" is not good enough to capture a CRLF! Trying to capture it with \r wasn't the right thing either, it took "\r\n" to match the group together with the first line! Here's the current status of the regex:
\[(?<Grp>.*)\]\r\n(?<Keyword>\w+)\s*=\s*(?<Value>.*)\r
The ultimate question would now be:
Of course the first key-value-pair after the group header isn't enough.
How can I include its repetitions into my match now?
|
|
|
|
|
\[(?<Grp>.*)\]\r\n((?<Keyword>\w+)\s*=\s*(?<Value>.*)[\r\n]?)*
I think this will help.
This contains multiple matches in keyword and value, just FYI.
|
|
|
|
|
This may not be the best forum for this question, but since I'm writing my application in VB.NET I figured this would be a good start.
Given:
VS2005 - Professional
I've created a label printing report in Crystal Reports which has 4 labels across and 8 labels down on a page.
My question is:
How would you go about providing functionality where I want to start my label printing on row 2, column 3 for the first page and just resume printing for the next set of pages?
I was thinking of maybe adding a 6 blank data rows to the dataset before binding it to the report and have the report suppress printing if the data is blank. Something like that.
Any other suggestions ?
|
|
|
|
|
David Mujica wrote: I was thinking of maybe adding a 6 blank data rows to the dataset before binding it to the report
That was what I was thinking.
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
|
|
|
|
|
Is there away to MIME Encode a bitmap image with VB.NET 2008?
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
|
|
|
|
|
Yes, that's possible. There's no native class that provides this out-of-the-box, but this[^] article might help.
I are Troll
|
|
|
|
|
Thanks Eddy
Steve Jowett
-------------------------
Real Programmers don't need comments -- the code is obvious.
|
|
|
|
|
Hi
I have a windows app with a datagridview and a textbox
On form load I bind the grid with all records in a table.
What I want to do is as I type in a textbox I want it to filter the grid to give me only what I have typed so far in the textbox.The seach will only filter on a specific colom and not on the entire grid's coloms.
Cna someone help me on this, I do it this way, because I dont want to hit the DB everytime I type a letter in the textbox.
Any ideas how to approach this?
|
|
|
|