Probably the easiest thing in the world, but I cannot find an
I'm a classic ASP/VbScript user, transitioning to c# and .NET. I'm
making a little PW change utility which does this:
1. User inputs an email address/username (into a textbox)
2. User inputs their current Password(into a textbox)
3. User presses a submit button
4. Server checks the value of the text in the currentPassword textbox
against the user's stored password in the DB. If they don't match,
then it displays an error.
5. Else, a Datagrid control returns their password for editing.
Now, there are many examples of the datagrid part, so I have steps
1,3, and 5 working. But for the other part, I need to---->
somehow assign the value of this sql query:
"SELECT Password FROM aspnet_Membership WHERE
aspnet_Membership.Email='" + emailID.Text + "'"
to a simple string variable, and
check that value against a textbox (placed in the code below as
'currentPassword', but it does nothing yet.
I know this should be dirt simple, but all the tutorials seem to get
super-excited about the various controls without ever giving a step-1,
simplest example of getting a single value from SQL and turning it
into a simple string variable :(. I don't need/want an array or a
recordset. I just need to grab this one piece of info as a validator.
Can anyone assist? I've been looking around the net for nearly a day,
embarrassingly.
Here's "my" code, which is modified from a good example I found:
----------------------------------------------
<%@ Page Language="C#" %>
<%@ Import Namespace ="System.Data.SqlClient" %>
<%@ Import Namespace ="System.Data" %>
<script language="C#" runat="server">
void Page_Load(object sender, EventArgs e)
{}
protected void Button1_Click(object sender, EventArgs e)
{
SqlDataSource1.SelectCommand = "SELECT Password FROM
aspnet_Membership WHERE aspnet_Membership.Email='" + emailID.Text +
"'";
SqlDataSource1.UpdateCommand = "UPDATE aspnet_Membership SET
Password = @Password";
}
protected void GridView1_PageIndexChanged(object sender, EventArgs
e)
{
GridView1.DataSourceID = SqlDataSource1.ID;
SqlDataSource1.SelectCommand = "SELECT Password FROM
aspnet_Membership WHERE aspnet_Membership.Email='" + emailID.Text +
"'";
SqlDataSource1.UpdateCommand = "UPDATE aspnet_Membership SET
Password = @Password";
GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender,
GridViewEditEventArgs e)
{
BindIt();
}
protected void GridView1_RowCancelingEdit(object sender,
GridViewCancelEditEventArgs e)
{
BindIt();
}
protected void BindIt()
{
GridView1.DataSourceID = SqlDataSource1.ID;
SqlDataSource1.SelectCommand = "SELECT Password FROM
aspnet_Membership WHERE aspnet_Membership.Email='" + emailID.Text +
"'";
SqlDataSource1.UpdateCommand = "UPDATE aspnet_Membership SET
Password = @Password";
GridView1.DataBind();
}
protected void GridView1_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
BindIt();
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Database Access Page</title>
</head>
<body style="font-family:arial,helvetica,sans-serif;">
<h3>Password Retrieval and Update Utility</h3>
<h5>for external, non-Hines Employees</h5>
<form id="form1" runat="server">
<div>
<table style="width: 469px">
<tr>
<td>
Enter your User ID (your email address)
<br />
<asp:TextBox ID="emailID" runat="server" Width="469px"
EnableViewState="true"></asp:TextBox>
<asp:TextBox ID="currentPassword" runat="server" Width="469px"
EnableViewState="true"></asp:TextBox>
</td></tr>
<tr><td style="width: 160px">
<asp:Button ID="Button1" runat="server" Text="Retrieve
your Password" Width="210px" OnClick="Button1_Click" /></td></tr>
<tr><td colspan="3"><asp:Label ID="lblMessage" runat="server"></
asp:Label></td></tr>
</table>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateDeleteButton="False"
AutoGenerateEditButton="True" CellPadding="4"
ForeColor="#333333" GridLines="None" Width="469px"
DataSourceID="SqlDataSource1" EnableSortingAndPagingCallbacks="false"
PageSize="5" OnPageIndexChanged="GridView1_PageIndexChanged"
OnRowEditing="GridView1_RowEditing"
OnRowCancelingEdit="GridView1_RowCancelingEdit"
OnRowUpdating="GridView1_RowUpdating" >
<FooterStyle BackColor="#990000" Font-Bold="True"
ForeColor="White" />
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True"
ForeColor="Navy" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#CC0000" Font-Bold="True"
ForeColor="White" HorizontalAlign="Left" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" Runat="server"
SelectCommand=""
UpdateCommand=""
DeleteCommand =""
ConnectionString="<%$ ConnectionStrings:db %>" />
</div>
</form>
</body>
</html>
------------------------------------------------------------ Tag: How Microsoft Dropped the Ball With Developers Tag: 230119
HQ Client is not starting itself on startup
I have a store where HQ Client is installed and in the startup group but does
not seem to be running when the machine is restarted. Someone has to turn it
on manually. All the other stores with HQ Client seem to run when the POS
terminal is started. Is there an option that can make the HQ Client not run
when the machine is started but have to be manually turned on?
--
Bob McQuay
ADI Business Solutions
Network Technician Tag: How Microsoft Dropped the Ball With Developers Tag: 230118
WinXP SP3 Printing Errors
I manage computers for my company and I downloaded SP3 on two systems the
other day. Today both of the systems that I have loaded SP3 on have printing
issues. I cannot print out of Adobe, Microsoft Picture Manager, Paint, and
Windows Picture & Fax Viewer just to name a few. We also have a purchasing
program that uses custom layouts that I have setup that we cannot get into.
Machines that I have not downloaded SP3 can access and print everything fine.
It has completely taken both computers out of service. I need to know if
anyone else is experiencing this issue and if anyone knows how to fix it. I
have tried to reload programs and nothing works. Tag: How Microsoft Dropped the Ball With Developers Tag: 230117
Issues with running two timers at the same time
Hi,
Are there known issues with running two timers at the same time?
I have bumped into a problem - I start a first timer at an interval of
5 seconds. 15 seconds later, I start a second timer at 15 seconds
interval. That's when things start to fail with the first timer (it
doesn't seem to do what it should do).
My seconds question: Is there a way to create a timer for a fixed time
period, say from 9:30 AM to 10 AM?
Any input, advice would be welcome! Thanks! Tag: How Microsoft Dropped the Ball With Developers Tag: 230112
set up a rule with reply to unwanted mail
I wish to reply to some unwanted senders with a standard template Tag: How Microsoft Dropped the Ball With Developers Tag: 230105
Recurring Appointments in Vista Calender
If an all day appointment is set up for a number of days, eg. 2nd Apr to 5th
Apr, the calender does not mark the last day.
Why? Tag: How Microsoft Dropped the Ball With Developers Tag: 230101
Importing music to movie maker
Can't import music to movie maker. The tracks show in my music. But when I
try to import from my music, under the audio file extension, the folder shows
empty. When I click on "all files" the tracks appear, but won't import. Tag: How Microsoft Dropped the Ball With Developers Tag: 230100
Microphone not working
I have recently purchased a web-cam with in-built microphone. My daughter
also purchased the exact same one. On her computer the mic is working fine,
although on my computer the mic does not work at all.
Does anyone have any idea why it is not picking it up???
I have Windows XP home edition.
We compared setting with our computer and her, there was a difference in
Speech Recognizer. I have Microsoft English Recognizer v5.1 and she has
Microsoft English (U.S) v6.1 Recognizer
Could this be the reason my mic is not working??? If so how do i upgrade to
the verson she has?? Tag: How Microsoft Dropped the Ball With Developers Tag: 230099
ShellExecute not working with Adobe 8 (VB)
i hava a VB application that is used to run different application by
using ShellExecute. These applications also includes Adode reader to
open .pdf files. The application is working fine with Adode reader 7
till now but after the installation of Adobe reader 8 the
ShellExecute
gives an error such that "No file found".
Can any one help me in this regard i.e. is there a problem with
ShellExecute or Adobe reader 8 ? Tag: How Microsoft Dropped the Ball With Developers Tag: 230098
Click Once - dead links - Process.Start
I have deployed several small .net clickonce applications on vista 64
bit/vs2008 and for the most part these work fine.
In order to navigate between these applications we have developed a program
that calls these programs by Process.Start( "\\unc\publish\app.application").
On Vista, where this was developed, everything works has expected. But once
this was deployed to XP the ClickOnce applications just will not run/install.
Navigating from XP to the publish directory and double clicking the
app.application files yields no response. No events logs, nothing.
I have checked the file association for .application and that is correct. If
I deploy these apps to a web site I can install and run them on XP, I just
can't programmatically start them from XP.
Any ideas where to start?
--
Scott Tag: How Microsoft Dropped the Ball With Developers Tag: 230096
INSERT Problem
This is driving me crazy ...
I have a typed dataset that I created using VS2008. I created an Insert
statement:
"INSERT INTO x (v1, v2, v3, ..., vN) VALUES (?, ?, ?, ... N?)"
Then I add parameters to the Insert command (OleDbCommand BTW, going into an
Access database):
myOldDbCommandInsert.Parameters.Add(new OleDbParameter("columnName",
OleDbType.DBTimeStamp));
myOldDbCommandInsert.Parameters.Add(new OleDbParameter("columnName2",
OleDbType.Char));
...
myOldDbCommandInsert.Parameters.Add(new OleDbParameter("columnNameN",
OleDbType.UnsignedInt));
Now I set my default values:
myOldDbCommandInsert.Parameters["c1"].Value = defaultValue1;
myOldDbCommandInsert.Parameters["c2"].Value = defaultValue2;
...
myOldDbCommandInsert.Parameters["cN"].Value = defaultValueN;
Then I create my data adapter:
OleDbDataAdapter a = new OleDbDataAdapter("SELECT * FROM x", myConn);
Then the dataset:
MyCustomDataSet ds = new MyCustomDataSet();
a.Fill(ds.MyCustomTable);
So far, everything has worked fine up until this point. So now, I simply
want to add rows to MyCustomTable:
SomeLoopWith5ValuesOrWhatever
{
MyCustomDataSet.MyCustomRowA r = (cast)
MyCustomDataSet.MyCustomTable.NewRow();
r.v1 = x;
r.v2 = y;
r.v3 = z;
r.nN = N;
myDataSet.myDataTable.Rows.Add(r);
}
Stepping through the debugger, that appears to do exactly what I expect. I
can see that the table gets the new rows, and they have the correct values.
However, when I do the following:
myDataAdapter.Update(myDataSet, "NameOfCorrectTable");
The correct number of rows are added to the correct table, but they do not
have the new values?!! They are keeping the default values that I set
earlier in my code. Why is my INSERT statement using these default values?
It's been a while since I messed with database stuff.
Thanks. Tag: How Microsoft Dropped the Ball With Developers Tag: 230095
Printer receives two of same print jobs
My Brother printer receives two of the same print jobs when I click PRINT -
however, the first job says it is deleting, but it never does and stops
printer printing. This happens on WORD. To print, I have to reboot, start
again, and then it only prints one doc before it returns to the deleting
message and jams.
Help!
--
Jock Kennedy Tag: How Microsoft Dropped the Ball With Developers Tag: 230091
Virtual Server 2005 & Internet Connection Sharing (ICS) using Wire
Hi
Scenario
1) Host - XP Laptop with internet connection using Sky Broadband Wireless
Router Netgear DG834GT
2) MS Virtual Server 2005 - I have deployed an XP MS Virtual Server 2005 to
act as a virtual machine
Problem
I am trying to share my Sky Broadband Wireless internet connection which
works on the host with the virtual server using Internet Connection Sharing
(ICS) and MS Loopback Adapter, however I get a page cannot be displayed error
on the virtual machine
Host Detail
1) Host IP Config
Note I had to change the IP Address on the Router to 192.168.0.x to
192.168.1.x because the loopback adapter needs 192.168.0.x
Ethernet adapter Wireless Network Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Virtual Server Detail
1) Virtual Server IP
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : mshome.net
IP Address. . . . . . . . . . . . : 192.168.0.254
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
2) Internet Gateway Icon on virtual Server
I can see an Internet Gateway Icon - Wireless Network Connection on <Host
Computer Name> which is connected
3) I have created a Virtual Network Adapter pointing to the Physical
Loopback Adapter on the virtual server with the virtual DHCP server disabled
I can ping 192.168.0.1 from both the host and the virtual server, however I
cannot access the internet from the virtual machine - I get a connecting to
site 207.46.192.254 message in the bottom bar then a page cannot be displayed
error. Internet access on host is working
I am relatively new to networking so have missed a vital trick somewhere -
please can someone help me.
Thank you in advance
B Singh Tag: How Microsoft Dropped the Ball With Developers Tag: 230089
ERROR Watching Mapped drive
Hi There,
i have an application which watches mapped drive events using
FilsSystem Watcher .
the filters i am using are these : NotifyFilters.FileName |
NotifyFilters.Attributes | NotifyFilters.Size |
NotifyFilters.LastWrite
now when there are too many file creation in the mapped drive , i am
getting an error from filesystem watcher
which states like this :"the network bios command limit has been
reached " .
i increased the watcher internal buffer size but ,it did not help .
i searched on the web to find one KB article() but wasn't useful.
everything i am doing is on windows-xp machines .
any help/comments/suggestion are highly appreciated .
Hope am Clear
Regards
Dee Tag: How Microsoft Dropped the Ball With Developers Tag: 230085
DotNetNuke
Hi All ,
I need some help on Dotnetnuke.
I installed on my system and created some skins by referring some tutorial sites but still i need more and more knowledge on DNN skinning,please any body help me how to do skinning?
refer some sites(not dotnwtnuke and dnncreative sites)
Thanks
Santosh Tag: How Microsoft Dropped the Ball With Developers Tag: 230081
Equivalent of template specialization using .NET Generics?
I know that template specializtion is not included in generics, but
was wondering whether or not there is an elegant alternative?
The first function is always called, but I was hoping that for
instances of type RealPoint (ComparePointByFiaNumber<RealPoint)>) the
second function would be called.
To implement different behavious based upon the type, do I have to
have a switch within Equals() that will check the type of T and then
call different functions as needed?
Many thanks,
Duncan
generic<typename T>
ref class ComparePointByFiaNumber : Generic::IEqualityComparer<T>
{
public:
virtual bool Equals( T x, T y )
{
Generic::IEqualityComparer<T>^ equalityComparer =
Generic::EqualityComparer<T>::Default;
return equalityComparer->Equals( x,y );
}
virtual bool Equals( RealPoint^ x, RealPoint^ y )
{
return true;
} Tag: How Microsoft Dropped the Ball With Developers Tag: 230080
Unusual Calendar invitation failure notification
All,
I've been trying to wrap my head around this for quite sometime and it
seems to be a growing issue. Below is the problem and my troubleshooting thus
far:
Outlook 2k3 Server w/ Outlook 2k3 Clients w/ Office SP2 installed
Two people, UserA and UserB, are trying to setup an appointment within
Outlook 2k3. UserA sends UserB a meeting invitation and immediately gets a
failure notice that it could not send to another User, UserC. Now UserC was
never on the invitation between UserA and UserB. Note that UserB does not
have to accept the meeting invitation for the failure notice to go to UserA.
I have looked at UserB's Calender permissions and UserC is not listed in
there at all. I've also taken UserB's Outlook account out of cached mode and
run a Global Address List update which where that account for UserC would
reside.
**These failures tend to start as soon as UserC's account is deleted**
We have also searched out Exchange Server for UserC's username or any
reference to such and come up with nothing.
Also a note is that it doesn't matter who tries to setup an appointment with
UserB they always get a failure notice that references UserC's Undeliverable.
The only way we've been able to solve this so far is to completely wipe out
UserB's Email account by saving all thier data to a PST file and then
rebuilding it. I'm wondering since my UserC is a Outlook 2k3 dependant
individual if there is something else I can look for to fix this situation. Tag: How Microsoft Dropped the Ball With Developers Tag: 230073
Assembly.LoadFrom fails on Vista,as does IE hosted user controls
Hi,
I have just upgraded a user machine to Vista (our first) as a test.
Unfortunately a couple of our apps are failing due to Vista...
1. One app that loads an assembly from an Intranet website now fails with
FileNotFound on a call to Assembly.LoadFrom(url). This still works fine on
all XP SP2 systems in the company.
2. Maybe related... Our Intranet hosts a couple of csharp user controls in
webpages, these too are not loading now on the Vista machine. It works on
all XP SP2 machines.
Does anyone have any suggestions as to why the two behaviours happen (.Net
2.0 and IE 7 is being used all round).
Thanks!
James Tag: How Microsoft Dropped the Ball With Developers Tag: 230072
simulate continuous forms & subforms in a windows forms application
I'm wondering how others have addressed UI requirements for Access-style
continuous forms and sub-forms in a windows forms application (besides
third-party products).
Thanks
Bill Tag: How Microsoft Dropped the Ball With Developers Tag: 230067
Opening an MSAccess DB
I am struggling with some MSAccess automation issues. Basically, we
have a .Net application that uses MSAccess for reporting (legacy
code). We are able to launch MSAccess fine and even work with the
MSAccess COM objects to run our reports (using GetObject(<MDB Path>) -
see http://support.microsoft.com/default.aspx?scid=kb;en-us;317113&Product=vbNET
for info on how to do this).
The problem that we are running into is that if our Access database is
already opened, we want to use it instead of opening up another
instance.
I've included the code I've got so far in case it helps with the
problem. The problem line of code is in ValidateAccessHandle (the
exact line is - mAccessHandle =
GetObject(imsAppConfig.DefaultMainMenuMDB)). If this line is commented
out and an instance of MSAccess is already running with our database,
a new MSAccess window will be launched, but the original MSAccess
window will be returned from GetObject(<MDB Path>). If we leave it in,
on some machines, if MSAccess isn't running, it will create an
instance without the window. Since we need pass MSAccess command-line
parameters, this doesn't work for us (also, a report tends to be more
interesting when you can see it :).
Any help is appreciated, thanks!
Private Function ValidateAccessHandle() As Boolean
If mAccessHandle Is Nothing Then
Try
' Check to see if there is an orphaned window.
' If we don't check, we'll end up opening another
window, but using the existing one anyway.
mAccessHandle =
GetObject(imsAppConfig.DefaultMainMenuMDB)
If mAccessHandle Is Nothing Then Return False
Catch ex As Exception
' On some machines, GetObject throws an untyped
exception when the file is not found.
mAccessHandle = Nothing
Return False
End Try
End If
Try
mAccessHandle.run("")
Return True
Catch ex As System.Runtime.InteropServices.COMException When
ex.ErrorCode = -2146820336
Debug.Assert(ex.Message = "You made an illegal function
call.", "Unexpected error message.", String.Format("The message for
this exception was expected to be 'You made an illegal function call.'
but was actually '{0}'", ex.Message))
' The Access window was closed normally (reproducable by
closing Access) and we need to reopen it.
mAccessHandle = Nothing
Return False
Catch ex As System.Runtime.InteropServices.COMException When
ex.ErrorCode = -2147023174
Debug.Assert(ex.Message = "The RPC server is unavailable.
(Exception from HRESULT: 0x800706BA)", "Unexpected error message.",
String.Format("The message for this exception was expected to be 'The
RPC server is unavailable. (Exception from HRESULT: 0x800706BA)' but
was actually '{0}'", ex.Message))
' The Access window was forced closed (reproducable by
opening Task Manager and killing all instances of MSACCESS.exe after
launching it).
mAccessHandle = Nothing
Return False
Catch ex As System.Runtime.InteropServices.COMException When
ex.ErrorCode = -2146825771
' This is expected. "" is not a valid method.
Return True
End Try
End Function
Private Function LaunchAccessClient() As Boolean
' The Access client is already launched.
If ValidateAccessHandle() Then Return True
Dim cmdLine As String = BuildCommandLine()
Shell(cmdLine, AppWinStyle.MinimizedNoFocus, True,
imsAppConfig.WaitTimeForAccess)
mAccessHandle = GetObject(imsAppConfig.DefaultMainMenuMDB)
Return ValidateAccessHandle()
End Function
Public Function BuildCommandLine() As String
'If the current user is "IMSAdmin" then start the access
client using the SystemAdmin user.
'Otherwise start the access client as the MRPUser.
Dim userName As String
Dim password As String
If imsAppConfig.LoginAsAdmin Then
userName = "IMSAdmin"
password = ""
ElseIf imsAppConfig.LoginAsSystemAdmin Then
'If the Login in as SystemAdmin is checked then log the
user in as SystemAdmin.
userName = "SystemAdmin"
password = "" ' removed for obvious reasons :)
Else
userName = "MRPUser"
password = "" ' removed for obvious reasons :)
End If
Dim runtimeSwitch As String
If imsAppConfig.StartWithRuntime Then
runtimeSwitch = " /Runtime "
Else
runtimeSwitch = ""
End If
'Check whether or not to call Startup
Dim startupSwitch As String
If imsAppConfig.RunAccessStartup Then
startupSwitch = " /x mcrAutoExec "
Else
startupSwitch = ""
End If
Dim cmdLine As String
Dim profile = GetProfile()
cmdLine = String.Format("""{0}"" ""{1}"" {2}{3} /profile
""{4}"" /user {5} /pwd {6} /cmd <User>{7}</User><UseCustom>{8}</
UseCustom><CustomGraphics>{9}</CustomGraphics>", AccessLocation,
imsAppConfig.DefaultMainMenuMDB, runtimeSwitch, startupSwitch,
profile, userName, password, imsContext.Current.UserName,
imsContext.Current.UseCustomObjects,
imsAppConfig.CustomGraphics.ToString())
Return cmdLine
End Function Tag: How Microsoft Dropped the Ball With Developers Tag: 230066
Compare timespan of Files?
II want to compare how many seconds there are between files. If the files are
within a 1 - 10 second range I want to copy them to their own folders. What I
have so far is a couple methods that take in all the files in a directory /
subdirectories and sort them by their lastWriteTime stamp:
Dim flist As List(Of System.IO.FileInfo)
Private Sub writeDirectories(ByVal ParentPath As String)
For Each sDirectory As String In
System.IO.Directory.GetDirectories(ParentPath)
flist.AddRange(New DirectoryInfo(sDirectory).GetFiles())
writeDirectories(sDirectory)
Next
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
flist = New List(Of System.IO.FileInfo)
writeDirectories("C:\Documents and Settings\ddivita\My Documents")
flist.Sort(AddressOf SortByLastWriteTime)
End Sub
Private Function SortByLastWriteTime(ByVal x As System.IO.FileInfo, ByVal y
As System.IO.FileInfo) As Integer
Return x.LastWriteTime.CompareTo(y.LastWriteTime)
End Function
I then want to take the flist and compare the TimeSpan between files. Here
is an example:
File1 - TimeStamp - 5:16:46
File2 - TimeStamp - 5:16:50
File3 - TimeStamp - 5:16:54
File4 - TimeStamp - 3:56:37
File5 - TimeStamp - 3:56:42
I realize I would need to compare file1 to file2, then file2 to file3, and
so on. I figure I could use the timespan class to help with this. Any ideas?
Thanks
Daniel Tag: How Microsoft Dropped the Ball With Developers Tag: 230065
how can i set up an account on craigslist to ask a question?
im tring to ask a seller a question a craigslist but i have to fill of this
form that asks if my server has a pop3 or an imap and i dont know what to
enter Tag: How Microsoft Dropped the Ball With Developers Tag: 230063
Printer keeps going offline
I have 2 networked computers, one XP and one Vista, sharing a printer through
a wireless router. The printer is always online with the XP, but regularly
drops offline with the Vista. I've found no way to get the printer back
online execpt to reinstall it. How can I prevent this, or at least to get the
printer back online without reinstalling? Tag: How Microsoft Dropped the Ball With Developers Tag: 230062
Computername
Hi,
How do i get the domain name and the computer name, e.g. "domain\pc-name" ??
Thank you in advance.
Peter Tag: How Microsoft Dropped the Ball With Developers Tag: 230059
error code 80070005
When I try to use windows update on Vista I get this error code 80070005, and
it will not let me check for updates. I can not find this anywhere on the
help site. Can anyone tell me what it is, and how I fix it. Thanks
--
Really_stupid Tag: How Microsoft Dropped the Ball With Developers Tag: 230056
Cool GUI
Hi, I need to do a vb.net main form wich calls others exes, but I would like
to do a cool form with some circles, circle form... cool menus...
Do you know any source / examples on internet with cool examples, menus,
etc... ?
Thank you very much! Tag: How Microsoft Dropped the Ball With Developers Tag: 230050
sorting a column in excel 2003
i want to sort a column in the following order a-1, a-2, a-3, a-4, thru c-15.
now excel is sorting a-1, a-11, a-12 c-11, c-3 ect. Tag: How Microsoft Dropped the Ball With Developers Tag: 230048
lost internet settings windows xp home
can anybody help please? Ive just spent 6 frustrating hours trying to recover
my pc system. Having downloaded a security program from my isp supplier my pc
crashed and although I have recovered the pc it appears that whatever hit me
has scrambled my internet connection settings and I can no longer connect. My
win.ini file and system.ini files were lost but through your pages have
managed to recover them. No matter what I do I cant seem to get to a place
where I can reinstate my internet settings. I know I am connected because i
am writing this on my laptop which uses the same modem so i believe that side
is ok. Where do I look? where are they hiding? system restore doesnt help ca
n anybody out there ??
thanks
--
retiredandslowsorry Tag: How Microsoft Dropped the Ball With Developers Tag: 230047
Firewall/red shield with white x icon
Someone please help? "on " "off" icons for Firewall won't highlight, so I
can't activate and I'm not getting anywhere when I try ro follow the
recamendations after clicking the risk status icon...
--
? Tag: How Microsoft Dropped the Ball With Developers Tag: 230045
setting a connection string for a Windows Service on production
Feel free to let me know if there is a better place to post this question
I'm a website developer trying to write a Windows Service, and I think I'm
running into trouble due to the paradigm shift.
In website development, I change the web.config file on the fly without
re-building a project. How does this work with the app.config in a Windows
Service? It seems like when I update a ConnectionString in app.config after
rolling to a production server, it doesn't take. Does app.config get
complied into the executable on build so that I can't change it on the fly?
If so, how would I set it up to be able to configure the db connection string
on the production server?
Thanks. Tag: How Microsoft Dropped the Ball With Developers Tag: 230038
Best practices for GUI of what called in MFC custom controls
Hello All,
I have MFC-based application featuring:
1) Flow of "Screens" where screens are implemented as a MFC's
CDialog-inherited classes loading PNG or BMP images.
2) Dialog's child controls also loads PNG or BMP images.
What is the best practice to handle the same functionality in .NET/C#?
Thanks, Tag: How Microsoft Dropped the Ball With Developers Tag: 230034
Delete contacts in Outlook 2007
Hi All,
Please let me know the correct group if this is in the wrong place.
I am trying to delete all Outlook contacts in a folder.
For some reason, the following code deletes exactly half of the contacts in
the folder. Can someone see what I'm doing incorrectly?
OutLook._Application outlookObj = new OutLook.Application();
OutLook.MAPIFolder fldContacts =
(OutLook.MAPIFolder)outlookObj.Session.GetDefaultFolder(OutLook.OlDefaultFolders.olFolderContacts);
foreach (Microsoft.Office.Interop.Outlook._ContactItem contactItem in
fldContacts.Items)
{
contactItem.Delete();
} Tag: How Microsoft Dropped the Ball With Developers Tag: 230031
Command Timeout
Any ideas why a text query would timeout w/ a dataAdapter and the Command
object, but execute quickly via Management Studio?
Thanks
--
Rob Schieber Tag: How Microsoft Dropped the Ball With Developers Tag: 230028
Lost volume and no games
Brand new computer. XP Home. Standard programs loaded. 15 year old
grandaughter messed with system volume and now cannot put volume control back
in the task bar. ALSO...cannot play any of the games that came with xp.
That problem began at the same time. Are the problems related? How to fix
withthout a complete wipe out and restore? Tag: How Microsoft Dropped the Ball With Developers Tag: 230022
Refeshing a DataGridView
I am working in vs2008 Win C#.
I have a windows form with a DataGridView. I go to a detail form to
edit/delete the data. When I come back the changes are not reflected. How
do I refresh the data to show edits and deletes?
Any help is greatly appreciated. Tag: How Microsoft Dropped the Ball With Developers Tag: 230020
2005 urgent Q needs answer...
hi,
i am using the login controls Etc, that come with 2005 but i need to
change the aspnet db file to another name to satisfy my server...
is there a way i can keep all these great webparts and have them point to
another db?
you can even email me direct... (a walkthrough kinda answer would prob be
best)
thank a mil in advance Tag: How Microsoft Dropped the Ball With Developers Tag: 230019
Detecting if an application is installed on a system
I have a series of applications that assume other applications are
installed. Is there a way to detect the installation of a specific
application?
Any help is greatly appreciated. Tag: How Microsoft Dropped the Ball With Developers Tag: 230018
(apparent) Marshalling related problem in x64 but works in x86
Hi,
I'm pretty sure I've just got a Marshalling problem, but I'm
completely stumped. If there is a better newsgroup to post this in,
please point me towards it.
First I'm trying to use SendMessage() with WM_COPYDATA to send a
string data between two instances of a program. As part of the
debugging I've written two methods one where a given instance will
obtain its own hWnd and send itself the message, one where it accepts
obtains the hWnd of the other instance and sends it to the other one.
Both methods work fine when compiled as x86. And the send-to-itself
works on x64, but the send-to-another-instance breaks... the
WM_COPYDATA message is sent, and received, but I'm unable to read back
the string data.
I *think* its a marshalling problem related to changes with x64. But
I'm not sure.
Here are the relevant bits:
// The COPYDATA structure used for the WM_COPYDATA message:
[StructLayout(LayoutKind.Sequential)]
public struct COPYDATASTRUCT
{
[MarshalAs(UnmanagedType.U4)]
public int dwData; // not used
[MarshalAs(UnmanagedType.U4)]
public int cbData; // holds length of string
[MarshalAs(UnmanagedType.LPStr)]
public string lpData; //holds string
}
//DLL Import of SendMessage
[DllImport("user32.dll", CharSet=CharSet.Ansi)]
private static extern IntPtr SendMessage(IntPtr hWnd,
[MarshalAs(UnmanagedType.U4)] int Msg,
IntPtr wParam, ref COPYDATASTRUCT lParam);
//The function that sends the message:
public static IntPtr SendCopyDataMessage(IntPtr toHandle)
{
int messageid = 1234; // random message id
stringdata = "Testing\0"; // send the string "Testing"
// Create/populate the copydata structure.
COPYDATASTRUCT dataStruct = new COPYDATASTRUCT();
dataStruct.dwData = 0; //not used
dataStruct.cbData = stringdata.Length;
dataStruct.lpData = stringdata;
// Make the call
IntPtr result = SendMessage(toHandle, WM_COPYDATA,
messageid, ref dataStruct);
return result;
}
The WndProc that receives the messages is an override of Form.WndProc:
// Process Custom Messages!
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_COPYDATA)
{
// unpack the data
string stringdata = ProcessWM_COPYDATA(m);
// show what it was
if (stringdata != null)
{
MessageBox.Show(stringdata);
}
}
base.WndProc(ref m);
}
The function it calls to unpack the COPYDATA structure is as follows:
public static string
ProcessWM_COPYDATA(System.Windows.Forms.Message m)
{
if (m.WParam.ToInt32() == 1234)
{
COPYDATASTRUCT datastruct =
(COPYDATASTRUCT)Marshal.PtrToStructure(
m.LParam, typeof(COPYDATASTRUCT));
return datastruct.lpData;
}
return null;
}
}
As I said: It works when targeted at x86. In x64 it also works when I
fire the send message at the same instance. (e.g. I have a button on
the form that calls the SendCopyData(...) with its own window handle.
The only time it doesn't work is when I have 2nd instance running and
it calls SendCopyData(...) with the hWnd of the OTHER instance. In
that case the message is received, and the MessageBox is displayed,
but instead of saying testing its either blank or contains garbage
data.
I'd be grateful if someone can point out where I've screwed it up. As
I said, I think its in marshalling/unmarshalling the lpData string,
but I'm at a loss to fix it. I've tried doing it a number of ways,
including setting lpData in COPYDATASTRUCTURE to an IntPtr, and then
manually calling Marshal.StringToHGlobal(stringdata); and then when
unpacking it, calling Marshal.PtrToString(lpData), but I end up with
the same behaviour... breaking in x64.
-best regards,
Dave Tag: How Microsoft Dropped the Ball With Developers Tag: 230015
need MMC help
I can't load or uninstall programs or run defrag: i have been told tha t i
need to re installMMC for XP; where can i donload this?
--
darby Tag: How Microsoft Dropped the Ball With Developers Tag: 230011
HELP! ACCIDENTLY REMOVED SOMETHING THAT SAID WINDOWS, ALSO....
So I accidently removed something that said windows. I don't know if it was
vital or not but it said just "Windows Installer." I don't know what it is,
but it's gone.
I did this because my computer (a Compaq Windows XP) only had the old
version of Windows Messenger and I wanted Windows Live Messenger which
wouldn't install and still won't.
Another problem I'm having is downloading Internet Explorer 7. Please help me. Tag: How Microsoft Dropped the Ball With Developers Tag: 230000
Knowing when a WCF service dies...
Hello Newsgroup,
I wonder how one would write wcf proxy code that is being notified
when the connected service channel is being closed (service process
ends for example).
I was subscribing the Channels and the Duplex Channels Closing and
Closed events but these have never been fired.
Any idea on that?
Thanks for you help!
Sebastian Tag: How Microsoft Dropped the Ball With Developers Tag: 229997
Can your app detect Webrowser events?
I want to make a WYSIWYG editor for HTML pages that can detect events in the
webbrowser control in real time and control the webbrowser control (and
internal documents) to allow simple stuff like dragging and dropping HTML
controls on the webbrowser control.
The goal is a real-time view of the page as it is edited.
Is it possible for a .Net app to trap these events and respond accordingly?
I have googled for soem code examples, but haven't found anything yet. Do
you know of any code examples of this?
Thanks so much for your time!
jim Tag: How Microsoft Dropped the Ball With Developers Tag: 229990
Web Development Accessibility About to Become Regulated By Law
Web Development Accessibility About to Become Regulated By Law
Read it (if you can) and weep because its very near becoming written into
law now that this report has been finished...and not just for federal
websites.
Section 508 Report
http://www.access-board.gov/sec508/refresh/report/ Tag: How Microsoft Dropped the Ball With Developers Tag: 229985
Downloading music from mp3fiesta
i can buy the track or tracks. after doing so one is directed to the download
center, were you are to right click the word download. from there you are
told to save it in a folder. i just downloaded service pack 2 and now im not
able to save my downloads to it's folder. any idea what might be blocking
this? Tag: How Microsoft Dropped the Ball With Developers Tag: 229981
Creating a 'proxy' redirector
Hi,
We have web application X where I work that allows us to access
documents via a url, for eg, http://hostname/app.cgi?request_dcoument?userid=yer?password=ner
etc...
What we would like is for our asp.net app Y to make this request (for
the purpose of hiding the above URL) but let web application X hosting
the document to stream the data back to the client.
Is there any functionality to do this in .net?
One idea i had was for the webserver to download the file in chunks
and simply pass the data on to the client, however, i don't want to
put strain on the server so Id rather avoid this. It consumes lots of
memory too.
Thanks in advance
Vince Tag: How Microsoft Dropped the Ball With Developers Tag: 229980
Windows Genuine Advantage Validation Tool - uninstall
I have genuine MS on my computer and this download that was somehow loaded on
to my computer says I do not or that I may be at risk. How do I get rid of
this pop up. Tag: How Microsoft Dropped the Ball With Developers Tag: 229979
command object vb2005 ado
hi all,
i'am working on a database based on VB2005 using ado.
iv a combobox on mine form, which i fill with a datareader and command. If
i've new data in my cbo.text and textfield , i want this to save the new
values into mine accesstable.
i have already a connection to mine db to fill the cbo with value.
ive tried with as followed:
'******************
dim newsql as string
'vrTxtfield1 and vrcbotext are two variabels which containes the new data i
need to store.
newsql = "INSERT INTO tbltest(field1, field2)VALUES (" & vrTxtfield1 & "," &
vrcbotext & ")"
Dim cmmdsql As New OleDb.OleDbCommand(newsql , cn)
cmmdsql.ExecuteNonQuery()
'**************
Which command do i need to achieve this ?
regards, Rob Tag: How Microsoft Dropped the Ball With Developers Tag: 229978
typed datasets vs. business objects
I'm trying to decide if it is better to use typed datasets or business
objects, so I would appreciate any thoughts from someone with more
experience.
When I use a business object to populate a gridview, for example, I loop
through a datareader, populating an array list with instances of a custom
class in the middle tier, and then send the array list up to the
presentation layer and bind the gridview to it.
If I use a typed dataset, I just fill it with a data adapter and then bind
it to the gridview.
It seems like the typed dataset would be more efficient, because I don't
have to loop through anything. But typed datasets are aggravating, because
it seems like they have to be defined all the way down at the data access
layer to be accessible in a n-tier solution. They clutter up my solution.
Business objects seem tidier, and seem more professional, but are they as
efficient, with all the looping required?
Thanks
Bill Tag: How Microsoft Dropped the Ball With Developers Tag: 229977
Change the default folder when opening documents
I have a user who stores her documents on a different drive and when she
attempts to open documents it auto defaults to My Documents instead of her
other drive. Is there a way to change the default for her? Tag: How Microsoft Dropped the Ball With Developers Tag: 229971
MY MOUTH IS CRAZY
Sometimes my touch mouse {cursor} will go crazy and move randomly around the
screen by itself clicking on things and
it opens and closes pages very fast until I unplug it, when I plug it back
in its ok again, I tried virus scan, mouse settings, cleaning the mouse,
etc... what can I do about it?
Thanks!
--
Dolores Tag: How Microsoft Dropped the Ball With Developers Tag: 229966