|
Use triggers. it will seperate the incoming data into two insert that into to two diffrent tables.
if we pass the second tables dataes as value for this triggers as input..
create trigger Trigger1 on trigtable1 for insert
as
declare @st1 varchar(10)
declare @st2 int
select @st1=(select trigtable1.F1Name from inserted)
select @st2=(select trigtable1.F2Name from inserted)
insert into trigtable2 values(@st1,@st2)
where Trigger1 <-- Trigger Name
trigtable1,trigtable2 <-- Table Name
str1 & str2 as variable for that triggers
Senthil S
|
|
|
|
|
This assumes he's talking about writing the same data to two different tables. Not very efficient if you ask me.
He could be talking about writing a single record where some of the data in the record goes in one table and other parts goes into another table.
|
|
|
|
|
hi,
i tried the following code:
objGroup = GetObject("LDAP://..........,dc=...,dc=...")
objGroup.PutEx(ADS_PROPERTY_CLEAR, "member", 0)
objGroup.SetInfo()
then i tried to add the same members to the same group --> i got an exeception:
The object already exists. (Exception from HRESULT: 0x80071392)
is there a local cache of the group ??
how can i remove all group members in a better way ?
thx in advance
|
|
|
|
|
depending on what you want look at the
dispose
clone
remove
removeall
removeat
methodes
|
|
|
|
|
This may not apply to your environment if you're using a single domain controller, but you may also have to wait for the updates to the group object to replicate around to all the domain controllers before they are actually removed from the group. This would cause the error you're getting.
This is because multple domain controllers can have the group object in different states at the same time. Just because one request, the deletes, went to one domain controller, subsequent requests are NOT NECESSARILY going to the same domain controller. One has the group with the members dropped, the other doesn't. You'll have to wait for the changes to be propagated to all copies of the group object before you can write the same members back.
|
|
|
|
|
Hi all,
The program i've seen have and error saying stimulsoft.controls.stitextbox not declared.
I don't know anything about stimulsoft controls, how does this work? anyone?
Thanks in advance.
![Smile | :)](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
That's not part of visual studio, you must have an error with an outside library that's in your project.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You probably are missing the assembly either in GAC or as a private assembly in your application/bin folder.
|
|
|
|
|
Thanks for the help guys. ![Smile | :)](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Hi,
I need to check whether a page has been completely loaded before displaying it to the user. Now there are multiple problems I am encountering regarding this. One is that most websites have frames, and the control fires a document completed event for all these frames individually. Even if I use the e.url property to check whether the correct url has been loaded, there is still a problem with urls that cause a redirection (e.g. if you go to www.wikipedia.com it will redirect you to www.wikipedia.org and hence the url will have changed). I cant think of any way to do this, except for the microsoft article on this http://support.microsoft.com/kb/180366 . The only problem is that the documentcompleted event in vb.net 2005 doesnt have this signature (and hence no pDisp parameter) and doesnt even have a documentBegin event. Any ideas on how I can do this? Thank alot!
Ahmad
|
|
|
|
|
Simply check WebBrowser's ReadyState Property
Good Luck
|
|
|
|
|
I want to develop a aplliction which will read incoming call's number and it will stoar to MsAccess Database. Please Guid me.
Kiran Sajanikar
Software Engineer
CleverBIT softwares.
Pune.
|
|
|
|
|
Kiran S. S. wrote: I want to develop a aplliction which will read incoming call's number and it will stoar to MsAccess Database. Please Guid me.
That's too vague. Guide you in what, exactly. What type of application, a winforms application, a console application, a web application, a mobile application, or some other type of application? What is your data model? Do you have a data model?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
dont be stupid man! he said "read incoming call numbers". it is a mobile application STUPID!
|
|
|
|
|
SamerAZ wrote: dont be stupid man! he said "read incoming call numbers". it is a mobile application STUPID!
Not necessarily. It could be a call centre application running off someone's desktop. It could be a service running on a VOIP server or any number of other things.
It would, however, have been stupid of me to assume that only mobile devices can deal with incomming calls.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
You've had an account here for almost 4 years, and this abusive, assumptive piece of crap is your first message?
|
|
|
|
|
It is a call centre desktop application. i want to develop it by using .net.
Software should able to read icoming call's number and it should stoar to MsAccess Database.
-- modified at 5:36 Thursday 9th August, 2007
Kiran Sajanikar
Software Engineer
CleverBIT softwares.
Pune.
|
|
|
|
|
Private m_lImageFileLength As Long = 0
Private m_barrImg As Byte()
1. OpenFileDialog1.ShowDialog(Me)
2. Dim strFn As String = OpenFileDialog1.FileName
3. Dim fiImage As FileInfo = New FileInfo(strFn)
4. Me.m_lImageFileLength = fiImage.Length
5. Dim fs As FileStream = New FileStream(strFn, FileMode.Open, FileAccess.Read, FileShare.Read)
6. m_barrImg(0) = Convert.ToInt32(Me.m_lImageFileLength)
On running above code I get the following error on line 6
An unhandled exception of type 'System.OverflowException' occurred
Additional information: Arithmetic operation resulted in an overflow.
Irshad
|
|
|
|
|
If the file is bigger than 2Gb then its length cannot be stored as a 32 bit integer.
You might also want to see what the debugger says is the value in Me.m_lImageFileLength before you convert it.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
M Irshad Qureshi wrote: Private m_barrImg As Byte()
M Irshad Qureshi wrote: m_barrImg(0) = Convert.ToInt32(Me.m_lImageFileLength)
There is your problem... you are trying to store a 32-bit integer in an 8-bit byte.
|
|
|
|
|
Well spotted - I completely missed that.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
I am hoping to get some help with this one as I am stumped.
I am writing a custom program to change local administrator account settings on a batch of computers picked from AD. In my company, we have as many as 300 servers in any given OU, and with such a large number of servers, there is always flux in their status (building, operational, decommission, etc). In order to better handle the list of servers, I want to use the Win32_PingStatus to see the disposition of the server. I have been running this in a small test environment and have run into a snag. Here are the details:
Client machine: WinXP SP2
Domain: Windows 2003 Active Directory
Servers in question: HPPC (offline) & HUNTER (online)
When I first started running the Win32_PingStatus command, I noticed that it was returning code "0" (Success) for the HPPC server. I went to a command prompt and pinged the server to make sure there was nothing else going on and it came back with an error that it could not resolve the name. After tracing the code, I saw that it was missing all of the other StatusCode numbers and going to the Success routine.
To make matters more confusing, I opened WBEMTEST to run the same query (SELECT * FROM Win32_PingStatus WHERE address='HPPC') from the same machine where I am running this application. To my surprise, there is no listing for StatusCode in the return properties on the test query.
I have searched every possible combination on Google, but have yet to find anything that references this type of false positive on this query. I am hoping someone here has some insight into what might be going on (or what I am doing wrong) as this needs to be completed by Friday (8/10/2007).
Here is the code that I am using in the function:
<br />
Function IsAlive(ByVal mServerName As String) As String<br />
Dim strStatus As String = ""<br />
Dim myConnectionOptions As New ConnectionOptions<br />
Dim myManagementScope As ManagementScope<br />
<br />
With myConnectionOptions<br />
.Impersonation = ImpersonationLevel.Impersonate<br />
.Authentication = AuthenticationLevel.Unchanged<br />
End With<br />
<br />
myManagementScope = New ManagementScope("\\" & My.Computer.Name & "\root\cimv2", myConnectionOptions)<br />
Try<br />
myManagementScope.Connect()<br />
Catch ex As Exception<br />
Return "Connect Error - " & ex.Message<br />
End Try<br />
<br />
If myManagementScope.IsConnected = False Then<br />
Return "Connect Error - Cannot connect"<br />
End If<br />
<br />
Dim myObjectSearcher As ManagementObjectSearcher<br />
Dim myObjectCollection As ManagementObjectCollection<br />
Dim myObject As ManagementObject<br />
<br />
myObjectSearcher = New ManagementObjectSearcher(myManagementScope.Path.ToString, "SELECT * from Win32_PingStatus where Address = '" & mServerName & "'")<br />
myObjectCollection = myObjectSearcher.Get()<br />
For Each myObject In myObjectCollection<br />
Select Case myObject.GetPropertyValue("StatusCode")<br />
Case 11001<br />
strStatus = "Buffer Too Small"<br />
Case 11002<br />
strStatus = "Destination Net Unreachable"<br />
Case 11003<br />
strStatus = "Destination Host Unreachable"<br />
Case 11004<br />
strStatus = "Destination Protocol Unreachable"<br />
Case 11005<br />
strStatus = "Destination Port Unreachable"<br />
Case 11006<br />
strStatus = "No Resources"<br />
Case 11007<br />
strStatus = "Bad Option"<br />
Case 11008<br />
strStatus = "Hardware Error"<br />
Case 11009<br />
strStatus = "Packet Too Big"<br />
Case 11010<br />
strStatus = "Request Timed Out"<br />
Case 11011<br />
strStatus = "Bad Request"<br />
Case 11012<br />
strStatus = "Bad Route"<br />
Case 11013<br />
strStatus = "TimeToLive Expired Transit"<br />
Case 11014<br />
strStatus = "TimeToLive Expired Reassembly"<br />
Case 11015<br />
strStatus = "Parameter Problem"<br />
Case 11016<br />
strStatus = "Source Quench"<br />
Case 11017<br />
strStatus = "Option Too Big"<br />
Case 11018<br />
strStatus = "Bad Destination"<br />
Case 11032<br />
strStatus = "Negotiating IPSEC"<br />
Case 0<br />
strStatus = "Success"<br />
End Select<br />
Next<br />
Return strStatus<br />
End Function<br />
In WBEMTEST, I am using the following query:
Select * FROM Win32_PingStatus WHERE address='HPPC'
And this is the response I get from that WBEMTEST query:
Win32_PingStatus.Address="HPPC".BufferSize=32.NoFragmentation=FALSE.RecordRoute=0.ResolveAddressNames=FALSE.SourceRoute="".SourceRouteType=0.Timeout=1000.TimestampRoute=0.TimeToLive=128.TypeofService=128
I appreciate any help that I can get on this.
One final note, I also tried these same tests on a valid machine name with the same results.
Thanks
Jonathan Tyler
|
|
|
|
|
Your code assumes that you get a StatusCode back. If the name cannot be resolved, you don't get a StatusCode, "<empty>" in CIM Studio, or Nothing in VB.NET. If you convert that back to a number, like your code is doing, you'll probably get 0. This is where you're getting the false positive from.
You can check to see if there is a value using:
For each obj As ManagementObject In objectCollection
If obj.Properties("StatusCode").Value IsNot Nothing Then
' There is an actual value in StatusCode.
' Handle this as you normally would.
Else
' StatusCode returned Nothing. This means
' the ping was never performed, so there is
' no status code.
End If
-- modified at 18:09 Tuesday 7th August, 2007
|
|
|
|
|
Thanks Dave,
I took what you said and went back to my workstation. I then placed a query in for an IP address of a known working machine.
Here is the query:
SELECT * from Win32_PingStatus WHERE Address="192.168.0.59"
And here is the result:
Win32_PingStatus.Address="192.168.0.59".BufferSize=32.NoFragmentation=FALSE.RecordRoute=0.ResovleAddressNames=FALSE.SourceRoute="".SourceRouteType=0.Timout=1000.TimestampRoute=0.TimeToLive=128.TypeofService=128
Pinging the address from command prompt:
Pinging 192.168.0.59 with 32 bytes of data:
Reply from 192.168.0.59: bytes=32 time<1ms TTL=128
Reply from 192.168.0.59: bytes=32 time<1ms TTL=128
Reply from 192.168.0.59: bytes=32 time<1ms TTL=128
Reply from 192.168.0.59: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.0.59:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
There is no resolution to handle on this one and I still received no status code. Still doesn't make any sense to me.
Jonathan Tyler
|
|
|
|
|
You cannot trust the .ToString() method of the returned object. You MUST look at the status code through the Properties collection of the object to get a valid test.
I tried the exact same thing using valid and invalid IP address. In both cases, the StatusCode was missing from the returned String, but worked perfrectly through the Properties collection.
|
|
|
|