|
Eddy,
Thanks, I will take a look.
|
|
|
|
|
I'm moving from Ms Access to vb.net/Sql Server. I'm looking for a sample project that includes a vb.net front end and Sql Server back end. There is plenty of sample code out there, but I havn't found any complete applications.
|
|
|
|
|
I'm not sure if you can find complete application, but there are plenty sample codes. What is wrong with sample codes?
|
|
|
|
|
I'm very new to programming, and I'm probably not much of a natural at it, although I enjoy it thoroughly. I learned what I know about Ms Access from "reverse engineering" an application(as well as reading books of course).
I just purchased a book Murach's ado.net vb2008, it has a good amount of sample applications so hopefully it will help.
|
|
|
|
|
soulrebelpd wrote: I learned what I know about Ms Access from "reverse engineering" an application(as well as reading books of course).
I'm not sure how much you can learn from reverse engineering alone. Not to mention the amount of time you will spend in understanding the code.
soulrebelpd wrote: I just purchased a book Murach's ado.net vb2008, it has a good amount of sample applications so hopefully it will help.
Good for you. Books are good source of information. Also consider taking a class. It may accelerate your learning curve.
|
|
|
|
|
|
|
Hi Everybody,
Is there any other process to register dll other than regsvr32 process. If yes please let me know.
Thanks in advance,
Jayachandra
|
|
|
|
|
An actual COM .DLL or a .NET assembly? Are you sure it's a COM-base .DLL? Library .DLL's cannot be registered.
The only other way to do it would be to poke the registry values in by manually, but that's not a good idea at all.
|
|
|
|
|
maybe ...
google this:
programmatically register activex dll
|
|
|
|
|
hello
I'm inheriting a legacy VB COM component - I tried register the component:
regsvr32 SomeMatlabUtil.dll
(The folder contains SomeMatlabUtil.tbl as well in same folder)
But I ran into the error:
SomeMatlabUtil.dll was loaded, but the DllRegisterServer entry point was not found.
We're deploying this on 64 bit WIN2003 machine. Need some help on this...
Thanks
dev
|
|
|
|
|
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.
|
|
|
|