You missed the part where I said you had to provide a DateTime object to the Value property of the Parameter object. You have to convert that String to a DataTime object first. Try the DateTime.Parse()[^] method to get a DateTime object from a String. Don't forget to valid your data before you pass it to the database. You don't want dates from the early 5th century getting in there now do you?
If you database and code is setup properly, you don't have to worry about the format at all.
Are you saying that, he had to format the string representing Date/Time since his database and code is not setup properly? Normally inserting a string into a Date/Time field in any format will work. What are the possibilities that result in a need for additional formatting work? Where has jds gone wrong here?
My company is switching from Lotus Notes to Exchange. Our Notes client have functionality, which allows user to select emails (as many as they want) and place them in a different custom built folders for legal purposes. We would like to duplicate this functionality in Exchange. Since this is a new product I have no idea if it's capble of doing so. I though someone might have some experince with this. Here's what I'm looking for.
1. User selects one or more e-mails.
2. User presses button to bring up a pop up list of xfolders (I guess this is have to be built in VB.NET if possible) that they have access to (preferably based on group membership)
3. User selects which folders they want the mails to be copied to (these will be public folders)
4. A copy of the mail is put in each folder.
Any ideas (links to articles, code, etc.) would be greatly appreciated. Thank you,
You can already do this in Exchange/Outlook and do it without using any code. Each user would have two email accounts open, their own and the account that is public and has all the folders in it. Then they just drag and drop the messages they want to the appropriate folders.
Get into the Exchange Administrators Guide for more information.
We would like to automate this somehow by providing user with list of folders to copy to at once rather than copy to one folder than copy the same email to another folder (you see what I mean).
Some sort of pop up form with list of folders comes to my mind (if possible).
Where user can first select all email he/she would like to copy then select all folders these email have to go to. Any thoughts?
NOw that you explain it that way, you would need code to do that. It's entirely possible to do, but you'd have to write an Office Add-In project to do it. I haven't done any Office work like this so this is about as far as I can go.
But, I'd start with hasing out the interface. From what you've described, the user selects a bunch of documents and does what with them?
The possibilities are for your code to retrieve a list of folders based on userID and add them to the folder list on the left so the messages can be dragged and dropped on them.
Another possibility is to have the user select of bunch of messages, then right-click one of them to bring up a context menu with your folder options on it.
Or the user would select the messages and click on a button in the Toolbar to get a list of available folders to copy the messages to.
Sorry Dave. I didn't explain it in more detail from the beginnind. You know how it is with writing. To me made sense. . Yes. I think last option you've mentioned is the one we want to go with.
(Or the user would select the messages and click on a button in the Toolbar to get a list of available folders to copy the messages to).
We only need to copy (not move) these messages into selected folders (selected by user).
You've mentioned that it would be Office Add-In. Is it possible to write something like this in VB.NET using VS. Currently we have VS v. 2003? And if it is, how do I integrate it into Exchange?
Thanks Dave. Client-side Add-In. Does this mean I have to install my add-in on each machine?
Or is it possible somehow avoid that? In Lotus Notes all users have their own database but the design template is one for everybody. So when we created this little application we only had to update main database to inlcude button (which brings folders list).
Does this mean I have to install my add-in on each machine?
Or is it possible somehow avoid that?
In Lotus Notes all users have their own database but the design template is one for everybody. So when we created this little application we only had to update main database to inlcude button (which brings folders list).
As you've probably already noticed, you're not asking about Notes...
I press a button2 to display a form2 (which displays as topmost)
Then ill press button3 to close form2 and display form3 (form3 also display as top most) and this works fine.
However...if say i have form2 open and i press button4 to display form4, then close form4, and then press button3 (which closes form2 and siplays form3) what happens here instead is that form3 displays BUT form2 does not close.
this is the sort of code im using
f = New Form2
Was hoping somebody maybe able to help me with this problem.
My guess is that based on the little code you posted you are using 'f' to represent the open form. So you press button2 and 'f' gets set to form2 which is then shown. When you press button3, you call f.close which closes form2 then you set 'f' to equal form3. However, the problem is that when you open form4 which you probably set 'f' equal to, you don't close form2. Now 'f' references form4 not form2. So when you click button3 and call f.close it try's to close form4 which is actually already closed.
I am getting following error when hit the update button.
No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21).
Any idea Why? thanks.
here is my code:
Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnupdate.Click
Dim data As New DataSet
Dim dbConn As OleDb.OleDbConnection
Dim dataAdapter As OleDb.OleDbDataAdapter
Dim connectionString As String = "Provider=sqloledb;Data Source=A45292\SQLEXPRESS;Initial Catalog=FSS;Integrated Security=True"
Dim sqlString As String = "SELECT * FROM [Caller Records] Where RecordNo =" & TextBox2.Text
dbConn = New OleDb.OleDbConnection(connectionString)
dataAdapter= New OleDb.OleDbDataAdapter(sqlString, dbConn)
dataAdapter.Fill(data, "Caller Records")
Dim tbl As DataTable
tbl = data.Tables("Caller Records")
Dim selectedRows() As DataRow
selectedRows = tbl.Select("RecordNo = " & TextBox2.Text)
If selectedRows.Length > 0 Then
selectedRows(0).Item("FirstName") = FirstNameTextBox.Text
selectedRows(0).Item("LastName") = LastNameTextBox.Text
dataAdapter.Update(data, "Caller Records")
First, why are you using the Ole data providers when your using a MS SQL Server? Use the Sql Server providers (SqlConnection, SqlCommand, Sql...) for better performance.
Next, you're retrieving all this data just to find a record and write it back when you don't have to. The DataSet object that you filled with your DataAdapter already has this data in it. If the textbox's are bound to the DataSet, the updates have already been made. Just call the Update method on your DataAdapter and it'll write the changed records back to the database. Just about all of this code is unnecessary.
I'm looking for a reasonable way to avoid the serialization of events/eventhandlers in VB.NET (2005).
Since the structure of the objects I wanna serialize is quiet comlex, removing before and re-adding all handlers after the serialization could generate new problems.
Is there any solution except moving to C# or implementing ISerializable?
Thanks guys for the replay!
Since I have some COM stuff included I'm afraid to be forced to use the binary formatter. So <xmlignore> will probably not work.
What I further need is an abstract soution since the project I'm working on is a kind of a framework. Using any 'object specific' implementation could end up in a mess.
I have had seen the link Dave mentioned before I posted this message and I was hoping that there might be an easier way.
It's really a shame.
I am trying to convert a string representation(2007-02-22) into a dateformat yyyyMMdd. it returns the right result as string but I want the returned type as date and in this format 2007-02-22 as XML API I am using requires a DATE not STRING representation like this.
Am I missing something very easy here (quite possible)?
Appreciate any replies.
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-23 12:19