|
|
Hi, I need help to change the primary SMTP proxy address of some users.
My users are in OU="user"
The proxyaddress of them are the following
SMTP: user1@test1.local
smtp: user1@test2.local
I need a script that change it in the active directory.
At the end of the script the proxyaddress of the user must be:
smtp: user1@test1.local
SMTP: user1@test2.local
Please, help me ...
Thanks
|
|
|
|
|
I am trying to fill a dataset and update a dataset to change values in a database. I have a third party program entering records in mydatabase. My program fills a dataset. I do some processes and update the dataset to update the mydatabase. All works well, until I factor in the fact that I want to watch the database and update a field when a record has a certain value so, I watch to see if any changes and Onchanged is called then I test the varables and if the record has a certain value I want to change a different value. But, then the Onchanged event is called again and I am in a endless loop of calling the method, changing the variable, calling the method, changing the variable. What would you suggest?
|
|
|
|
|
|
That won't work on an Access database.
|
|
|
|
|
There's no reliable way to do this in Access. Access doesn't support triggers, so your kind of screwed.
You could use the FileSystemWatcher, but there's a problem with this. In order to get this to work, your Changed event would have to set a flag when it see's a change made and need to make its own change. This flag would tell the Changed event that it should ignore the event when it gets called again and then reset the flag.
Private Sub ChangeEvent(blah, blah) Handles ....
Static updatingDatabase As Boolean = False
' A change to the database has been detected.
' Check the flag to see if WE made the change, or if an outside
' source made the change.
If updatingDatabase Then
' We're making the change. Reset the flag
' and do nothing.
updatingDatabase = False
Else
' An outside source made the change.
' Set the flag and make our changes to the database.
updatingDatabase = True
' Do you database update here.
End If
End Sub
Now, there is a large problem with this. If the outside source makes a change to the database while this code is running, you can't tell the different between your code making the change and the outside source making the change. It's entirely possible that the outside source changes the database and your code will never see it.
There is simply no way to do this reliably in Access. SQL Server, even the FREE Express Edition, support Triggers, that will easily allow you to do this in the SQL code of your database.
|
|
|
|
|
I have been seeing the following code I do not know what the characters mean
in a web page
<%$ Tranlate: any string value %>
I know that translate is a function in the code and it is translateing the any string value to another string but could you tell me what the $ means how is it different then <%# and what the : does
In some code I also find
NewRow!somefield = somevalue
what does the ! mean and what does it do
Thanks
|
|
|
|
|
I don't know about the first one, but "!" when late-bonding is the same as "." when early-bonding.
<code>
Dim FSO
FSO = CreateObject("Scripting.FileSystemObject")
' This line of code is unknown to compiler:
Call MsgBox (FSO.DriveExists("D:"))
' So use this instead:
Call MsgBox (FSO!DriveExists("D:"))
</code>
|
|
|
|
|
Hello all,
I was wondering if anybody could provide me with an example on how to iniatiate a IRC Session, and keep it alive, in VB.Net.
I understand parsing messages, but I cannot think of any ways to respond to the Ping Pong system.
Many thanks, Fahad Sadah
All of my programs are downloadable at fahadsadah.co.nr I hate site errors =]
|
|
|
|
|
Do what any of us are going to do. Google for "VB.NET IRC Client".
|
|
|
|
|
In VB 6.0:
I create a simple OCX, i want to raise some event when the user control initialize.
But the program does not runs correct. why?
following is my program:
In UserControl1.ctl:
Public Event InitControl()
Private Sub UserControl_Initialize()
RaiseEvent InitControl
End Sub
In Form1.frm
Private Sub UserControl11_InitControl()
MsgBox "UserControl Init"
End Sub
Why the messagebox can not be shown when i start my program? thanks~~~~~~~~~~~
|
|
|
|
|
|
I have a dataGrid that is populated by SQL table. The Datagrid has two dynamic columns - that I created to for calculations. I want to sort the grid on frmload by one of the dynamic columns is that possible - if so; what will be the best way to do this?
Thank You
|
|
|
|
|
hi
Use Orderby in your SQl statement.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
How will I do that? - this is my code below - the Sql statement will order by a column in the table - in my situation I have a column that is not part of the table it was created dynamically - below is my code
Dim command1 As New SqlCommand("Select * FROM LateOrders_query_view order by requested_date desc", cnn1)
Dim SqlReader As SqlDataReader
cnn1.Open()<br />
<br />
Dim dt As New DataTable("LateOrders_query_view")<br />
Dim DirAdapter As New SqlDataAdapter(command1)<br />
DirAdapter.Fill(MyDataSet, "LateOrders_query_view")<br />
<br />
dgOrderReport.DataSource = MyDataSet.Tables("LateOrders_query_view").DefaultView<br />
<br />
'Create Dynamic Columns call related function<br />
Dim dc As DataColumn<br />
dc = New DataColumn("Days Open") ', Type.GetType("System.double"))<br />
MyDataSet.Tables(0).Columns.Add(dc)<br />
fncGetOpenDays()<br />
<br />
Dim dc2 As DataColumn<br />
dc2 = New DataColumn("Days Late")<br />
MyDataSet.Tables(0).Columns.Add(dc2)<br />
fncGetDays()
Is there away for me to sort by a dynamic column (the dynamic column is not part of my table in the database)
Thank You
|
|
|
|
|
I figured how to make it sort - its pretty simple here is the code
Dim dc2 As DataColumn<br />
dc2 = New DataColumn("Days Late")<br />
With dc2<br />
.AutoIncrement = True<br />
.AutoIncrementSeed = 1<br />
.AutoIncrementStep = 1<br />
End With
Now I just need to get it to do this on load not when I click on that column...
Help will be appreciated. Thanks
Thank You
|
|
|
|
|
hi KA National Marker
am sorry i could not reply, it was friday, i dont access the net on weekends. i do that when am at my workplace. am glad you find your answer.
i know you are smart after all
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello!
I have two rich text boxes RTB1 and RTB2.
I have text with different fonts,colors and styles in RTB1 and RTB2 is empty.
when i use this code:
RTB2.text = RTB1.text
RTB2 displays the text but with its default font and color.
How can i keep the fonts and styles used in source text box to the destination textbox.
Thanks for Any help!
colgateas900197
|
|
|
|
|
use the copy and paste methodes:
RichTextBox1.SelectAll()
RichTextBox1.Copy()
RichTextBox1.DeselectAll()
RichTextBox2.Paste()
tested it with bold text and works
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Thanks! It works....
It work for different colors and fonts as well.
Thanks again!
colgateas900197
|
|
|
|
|
hi,
use following code
rtb2.rtf = rtb1.rtf
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
thank you Rupesh!
it works...
i have used (as suggested by TDDragon)
RTB1.SellectAll()
RTB1.copy()
RTB1.deselectAll()
RTB2.Paste()
It also works!
Could you please tell me what is the difference? What are limitations? These are same or one has advantage over other?
colgateas900197
|
|
|
|
|
Rupesh Kumar Swami... wrote: rtb2.rtf = rtb1.rtf
is a single line of code.
SoInnocentIAm... wrote:
RTB1.SellectAll()<br />
RTB1.copy()<br />
RTB1.deselectAll()<br />
RTB2.Paste()
is four lines of code.
Although for all intents and purposes there is no difference, RPS's solution is meant to do do what you wanted, while TDDragon's suggestion does what you wanted as a side effect.
I would recommend using RPS's code, simply because keeping your code as small as possible is always preferable.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi, Am new to Dot net. I would like to print the data in the data grid in a VB.NET application.
Anyway to go round this?
All effort put is highly appreciated.
|
|
|
|
|