|
I now have a better understanding of the behavior and a workaround but still do not understand why.
1. Seem to be limited to the dtPicker control from VB6 and not other ctls as DateTimePicker, textboxes, etc.
2. OleAut is not a legal date occurs in the same form code behind and err 35788 An error occurred in a call to the Windows Date and Time Picker control when in a different module.
3. Occurs when the form is NOT VISIBLE
4. FormClosing has no effect even though it is still not clear why it is invoked twice when it is Xed out.
5. Finally a workaround.
b=form2.visible:form2.visible=true:form2.visible=b
seems to fix the problem at least in the test project on VB.Net 2005.
Long term replacement of the VB6 dtPicker with .net DateTimePicker and a collection seems to be a way to go.
The workaround will be applied to our production program and we will see. We will be moving to either VB 2008 or 2010 shortly and not sure if the behaviour changes or not.
It would be nice to have explanation of what is happening.
|
|
|
|
|
Hi all
I need to work on databases that have .db extension.
My boss insists that this type of database is the fastest.
i tried searching for it and found that its a thumbnail database on filext.com
I need to put text on the database and am sure its possible.
and on googling I found several links for java,etc.
I don't know nothing about .db files but I know how to handle ADO.NET
Help me with some info about them like its source website,etc (any info is welcome)
Thanks
|
|
|
|
|
Just because it has a .db extension doesn't mean to say that the database type (e.g. ms-sql, mysql, dbase) is the one you think it is.
Your boss needs to tell you what the exact type is, and what version it is.
From here you can find the correct api libraries and connectors etc, that you will need for interacting with the database
|
|
|
|
|
|
thanks for the reply.
My boss says that it should has the extension of .db
Thats the only matter with him.
He's a jerk.
I will now give an overview of my (strictly my boss')
the database extension should be .db (I dunno why he's sticking with that)
only one table is required.
the application should run on any windows with .net 3.5 (he calls that portable)
the read/write speed should be fast.
that's all.
|
|
|
|
|
Jack_18 wrote: He's a jerk.
And thats a good way to get fired!
|
|
|
|
|
He knows me by another name.
anyway I don't think he visits the coding forums!
|
|
|
|
|
Since your boss wants to use .db files, and the database only has one table, it's up to you to decide on which database to use. It sounds like it's a light-weight database, and no concurrency is involved.
If that is the case, I suggest that you use SQLite. The database file used by SQLite can be named using any extension, so you just use .db.
SQLite is fast, so your boss will be happy.
If you use C/C++, you can use the source code of SQLite directly in your program. For C++ there are a few wrappers available that greatly simplify the use of SQLite.
If you use C#/VB.NET, then ADO.NET implementations are available, making it very easy to use.
|
|
|
|
|
hey thanks buddy!
will that be portable?
the exe file should run without the need of any dlls.
|
|
|
|
|
I performed some search and found that you need "sqlite.dll" in the same folder as the exe file.
I know its only 441 KB in size but its my boss. He's mad.
can you give me any other choices?
|
|
|
|
|
There are no other choices. Any database you use with it's own provider is going to a) provide the best performance and b) require the use of a library (.DLL's) to do it.
|
|
|
|
|
(VB.NET) I am using 2 DateTimepicker controls on form one for To: and 2nd for From (TO get particular Range of DATE)
Now i want to check all dates(TO->from)Range from db which are in range. Plz tell me the Query and should i use db column type as DateTime now i m using ntext to save date .
I m using sqlserver2005
plz help
|
|
|
|
|
You might find this[^] article useful.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I like it!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Hi
I need to build a File Sharing program in Vb.net that will be used to share the Files between two computers through the local network
I need some help regarding the Start.Where and how should i start. Shall i have to use the Socket programming or is there any other way of doing this task.
Please help
M.Alizadeh
|
|
|
|
|
|
Message Closed
modified 7-Jul-17 13:07pm.
|
|
|
|
|
nice to see you here. yes i am iranian...
thanks for your useful program
that was so helful
M.Alizadeh
|
|
|
|
|
Hi,everyone!I want to add a combobox in a cell of excel file with VB.net,but when I used sheet.shapes.addxxx fuction,I found that there were "addChart" and others but no addCombobox.
What should I do could add combobox in a cell with vb.net?Please help and give me suggestion!Thanks a lot!
|
|
|
|
|
You don't. ComboBox's sit on top of the sheet, not in it's cells.
|
|
|
|
|
|
In Excel 2007, you need to first display the Developer Ribbon from the Excel Options | Popular panel.
Then on the Developer Ribbon, Insert Control | ActiveX Combo (Form Control Combo will be disabled)
As Dave has already stated, the control sits on top of the sheet, and is not 'inside' a cell. They just happen to move relative to the cells where you placed them (by default), if you insert and delete / resize cells. You can change the move/resize action from the objects properties though.
|
|
|
|
|
Thank you!I understand now.
|
|
|
|
|
I am trying to look through a database and checked items in a checkedlistbox based on a Contact ID number. The error I'm receiving is this : Public member 'item' on type 'String' not found.
The error is on this line of code: "If lstDebtState.Items.Item(x).item(0) = dt2.Rows(j).Item(0) Then"
Here is my code:
Try
con.Open()
Dim sql As String
sql = "Select Contact_ID from Contacts where Company = '" & company & "'"
cmd = New OleDb.OleDbCommand(sql, con)
Dim dr As OleDb.OleDbDataReader
dr = cmd.ExecuteReader
Dim Contact_ID As Integer
While dr.Read()
Contact_ID = dr.GetInt32(0)
End While
Dim da As New OleDb.OleDbDataAdapter("SELECT * FROM Contacts WHERE Company = '" & company & "'", con)
Dim da2 As New OleDb.OleDbDataAdapter("SELECT * FROM Contact_Locn WHERE Contact_ID = " & Contact_ID & "", con)
Dim ds As New DataSet
Dim ds2 As New DataSet
da.Fill(ds, "Contacts")
da2.Fill(ds2, "Contact_Locn")
Dim x
Dim j
Dim dt As DataTable = ds.Tables("Contacts")
Dim dt2 As DataTable = ds2.Tables("Contact_Locn")
For x = 0 To Me.lstDebtState.Items.Count - 1
For j = 0 To dt2.Rows.Count - 1
If lstDebtState.Items.Item(x).item(0) = dt2.Rows(j).Item(0) Then
lstDebtState.SetItemChecked(x, true)
End If
Next
Next
txtcompadd.Text = dt.Rows(0)("Company")
txtaddressadd.Text = dt.Rows(0)("Address")
txtCityAdd.Text = dt.Rows(0)("City")
cbStateadd.Text = dt.Rows(0)("State")
txtZipAdd.Text = dt.Rows(0)("ZipCode")
cbCountryAdd.Text = dt.Rows(0)("Country")
txtFname.Text = dt.Rows(0)("Fname")
txtLName.Text = dt.Rows(0)("Lname")
txtOffice.Text = dt.Rows(0)("OfficePhone")
txtCell.Text = dt.Rows(0)("CellPhone")
txtAssistant.Text = dt.Rows(0)("AssistantPhone")
txtTitleadd.Text = dt.Rows(0)("Title")
txtEmailAdd.Text = dt.Rows(0)("Email")
txtWebAdd.Text = dt.Rows(0)("Website")
txtFaxAdd.Text = dt.Rows(0)("Fax")
cbdebt.Checked = dt.Rows(0)("Debt")
cbequity.Checked = dt.Rows(0)("Equity")
cbmezzanine.Checked = dt.Rows(0)("Mezzanine")
cbcredit.Checked = dt.Rows(0)("CreditEnhancement")
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
End Sub
|
|
|
|
|
Jesse32 wrote: lstDebtState.Items.Item(x).item(0)
Have you got 1 too many .item on this line? doesn't look right.
.item(x) is possibly returning an object of type string, hence the error.
|
|
|
|