|
Well, the best place to ask this would be the C# forum, not the vb one, but anyway check out http://www.connectionstrings.com. It would also help if you posted the error.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
1. Wrong forum. This should go to C#/General database forum depending on your problem.
2. If connection string is the problem, take a look at ConnectionStrings.com website.
3. If remote conection is the problem, check if your SQL server allows remote connection. You can change the settings through Surface Area configuration provided you have the authority to do so.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I have a need where i need to read email for a particular email account (help@somedomain.com). how can i read teh email account from exchange server.
|
|
|
|
|
Exchange server 2007 has a web service which you should use - google for Exchange Web Service or EWS. Its not all that straight forward, but its not difficult. Prior to this, you could use WebDav or CDO/MAPI
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Use redemption....excellent resource for handling emails from outlook or exchange server.
|
|
|
|
|
Can we send emails in Exchange Server 2007 without using SMTP means without activating it,
I used CDO/MAPI , Winsocks but could not succeed without SMTP is their any wayBest Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
You can by using the web service. Check the documentation, you can do just about anything via the exchange web service. Bob
Ashfield Consultants Ltd
|
|
|
|
|
Apologies in advance, I suspect there may be an obvious answer to this, but I have searched these forums and google and not really been able to determine the solution.
This is for a WPF application, but I think it is a more general programming question.
We have an ObservableCollection(of T), where we need do do some validation of the member object, T. One of the rules is that a property of T (say name) cannot already exist in the collection.
Our validation class is instantiated from the xaml, so I don't know of any way to pass in the reference to the ObservableCollection. However, this is needed to be able to step through the collection, to see if name has already been used, and report an error (if needed).
One solution I can see is that the class T could have a property which is an ObservableCollection of T, and then you pass the parent collection into the member object. I think this will solve the issues, but something says to me this would be bad practise... Can anyone clarify whether this will cause errors or should be avoided? Can anyone suggest an alternative?
More specifically, say we define Person
Public Class Person
Public Sub New(ByVal Name As String, ByVal People As ObservableCollection(Of Person))
...
End Sub
Public Property Name() As String
...
End Property
Public Property People() As ObservableCollection(Of Person)
...
End Property
End Class
Then elsewhere make a collection of Person
Dim MemberList As New ObservableCollection(Of Person)
MemberList.Add(New Person("John", MemberList))
MemberList.Add(New Person("Fred", MemberList))
MemberList.Add(New Person("Jane", MemberList))
MemberList.Add(New Person("Andrew", MemberList))
Then we can bind say a WPF DataGrid to MemberList, and use validation to check our rule, to check that the Person name has not already been used in the ObservableCollection(of Person) - ie MemberList. The approach here will work, but I am concerned that there might be underlying problems - some circular reference or something (or else just not good practise).
Thanks for any suggestions.
Tim
modified on Tuesday, October 27, 2009 1:40 AM
|
|
|
|
|
Wait a second. Let me see if I understand you. You're trying to have a member object search it's parent collection to see if another object in the collection has a property value that already exists?? Correct??
This is backwards. Under OOP concpets, a member object should never even know that it is part of a collection, let alone how to manipulate it's parent collection.
I think a better way would be to create a PeopleCollection inheriting from ObservableCollection and overriding the Add method to check for this.
|
|
|
|
|
Dave,
Thank you very much for your reply and for setting me in the right direction! Yes, you understood correctly - and your response crystalises the concerns I had about doing this. Thanks again.
In fact the snippet posted was overly simplified - we already inherit from ObservableCollection and implement some Find and Sort methods, so we could override the Add method. What I am concerned about is a user editing the value to make it invalid, then being able to catch this scenario and alert the user. I know of many ways to do this, but I am trying to determine the best approach in WPF - so I will take this question to that forum (and in fact I have had the specific question on a relevant article for a few weeks but no reply).
Your help is appreciated.
Regards,
Tim
|
|
|
|
|
Hmmmm.... I think you might have to change from inheriting from ObservableCollection to implementing your own collection class. You'd probably inherit from Collection(Of T) and implement the two interfaces INotifyCollectionChanged and INotifyPropertyChanged. You'd keep a collection internal inside the class and explose it just like ObservableCollection does, but add code in the Items(Of T) property to check for this condition.
|
|
|
|
|
I am developing a software with vb.net 2008, that I would like to interact with a PLC. Does any one ever tried it? If so can you please explain to me? Or tell me where can I find information on this subject? At the moment I do not have any plc brand, this will depend upon the response and information that I find. Thank you.
|
|
|
|
|
I suggest you start by reading the first 20 pages linked to by this[^].
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
http://consolitech.com/Downloads.htm#OPCClientControls[^]
There are some sample applications etc here so you can see what is involved. They also sell hardware.
I don't speak Idiot - please talk slowly and clearly
'This space for rent'
Driven to the arms of Heineken by the wife
|
|
|
|
|
Okay i just need the code to have my program call upon another program say, Notepad for example. i havnt got the slightest idea how to go about it
thanks in advanced.
|
|
|
|
|
Investigate the Process class, particularly the Process.Start method.
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.”
|
|
|
|
|
Will do, ill post back to make sure i got it working right.
|
|
|
|
|
System.Diagnostics.Process.Start("notepad.exe");
|
|
|
|
|
|
Hi to all
I have a special keywordlist that I would like to import in a treeview. The txt file looks like this, and works with tabs. So there is a maintopic. under the maintopic in a new line there is the undertopic with a tab. Perhaps under this undertopic is another undertopic in a new line with 2 tabs. It looks like This:
HeadLine
[TAB] Text1
[TAB] Text2
[TAB][TAB] Text3
[TAB][TAB] [TAB] Text 4
[TAB] Text3
Next Headline
[TAB] Text I
[TAB][TAB] Text
[TAB][TAB][TAB]TextI1
Does someone has an idea? I can mail a txt file that shows it detailled.
modified on Monday, October 26, 2009 5:01 PM
|
|
|
|
|
Sounds trivial to me. You count the tabs and every time the number goes up, you're adding child nodes. When it goes back down, you're adding a sibling to the parent.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Perhaps....but I'm a bit new in this. With directories etc. I get this. Your idea is good, but I don't know how to create this for...next body!
|
|
|
|
|
You're a bit new at VB ? In what context have you been given this task then ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am trying to edit VB 2005 code developed by someone else. The developer put controls in splitter panels. It is not necessary to use them in this app and it also makes it difficult to edit the GUI.
How do I remove the panels/container? Highlighting the panel and pressing "Delete" does nothing.
Thanks!
|
|
|
|
|
In the Form Designer pressing Esc moves focus to the parent of the currently selected control.
What's probably happening is that you are selecting Panel1 or Panel2 of the SplitContainer and these cannot be deleted. So do as you did before but hit Esc before Del. This will take focus to the SplitContainer itself, which can be deleted.
Hope this helps.
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.”
|
|
|
|