|
You really need to talk to the people who provided the device and the sample program.
|
|
|
|
|
If someone knows how it works, it is the maker's people.
Why don't you ask them ?
Note that you sis not even gave the brand and model.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Meax wrote: but i am not getting correct data.
How did you determine that is not correct? Why is it not correct?
|
|
|
|
|
I am developing a mvc app using email confirmation using this line
await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>");
is part of
public class UserManager<TUser, TKey> : IDisposable
I want to be able to send an additional parameter and get that parameter back when email is confirmed
any idea?
|
|
|
|
|
Why not append "?secretkey=value" to callbackUrl. Then when they use that link it will be presented to your server. Managing the security of this parameter is a separate exercise, one you'll need to think about.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
This is the program:
dim data as boolean=true
'dim dt as system.data.datarow
if CType(mainformdataset.tables("BO3").rows(0).item("TAXPOINTDT"),system.date)=01.01.1900
Return False
ELSE
Return True
end if
So the error is on the line 3
This is the program:
dim data as boolean=true
'dim dt as system.data.datarow
if CType(mainformdataset.tables("BO3").rows(0).item("TAXPOINTDT"),system.date)=01.01.1900
Return False
ELSE
Return True
end if
So the error is on the line 3 with the line 4
This is a PHC program and is on the web
Ty for your collab!
|
|
|
|
|
You already posted this in QA and got your answer. There is no need to cross post this.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Dim cmd As New OleDb.OleDbCommand
Dim conn As New OleDb.OleDbConnection
Dim constr As String
Dim dr As OleDbDataReader
constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\VB.Net Secondary\SecondaryDb.accdb;Persist Security Info=False"
conn.ConnectionString = constr
conn.open()
cmd = New OleDbCommand("Select * From Studenttbl WHERE Student_ID = @StuID", conn)
cmd.Parameters.AddWithValue("@StuID", txtStudentID.Text)
dr = cmd.ExecuteReader
While dr.Read
MsgBox(dr(1))
txtSurname.Text = dr.Item("LastName")
txtFirstName.Text = dr.Item("FirstName")
End While
dr.Close()
dr.Dispose()
conn.Close()
|
|
|
|
|
And? Did you have a question of some sort?
Do you see any errors displayed on your screen?
What did the debugger show you when you stepped through your code?
What is in "dr" after you execute your query?
What does txtStudentID.Text contain?
Do you have any records in your database that match that ID?
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
My bad, I did not even ask a question, I was tired, have been working for several hours.
- the project does not display any errors, when I stepped through the program, debug shows that all the text boxes are empty. I do have records in the database that matches the ID.
Thanks for your time
|
|
|
|
|
Try actually using the debugger to see if you getting data out of your database and if you are when it disappears. We don't have your code, your files or your data so we can't debug your code for you. It's up to you.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Here is my Code
Dim cmd As New OleDb.OleDbCommand
Dim conn As New OleDb.OleDbConnection
Dim constr As String
Dim dr As OleDbDataReader
constr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\VB.Net Secondary\SecondaryDb.accdb;Persist Security Info=False"
'Object To Use As SQL Query
conn.ConnectionString = constr
conn.open()
'Search SQL Query, Including a Parameter Called Name 'This Query Simply Retrieves All Information That Matches Our Criteria
cmd = New OleDbCommand("Select * From Studenttbl WHERE Student_ID = @StuID", conn)
cmd.Parameters.AddWithValue("@StuID", txtStudentID.Text)
dr = cmd.ExecuteReader
While dr.Read
MsgBox(dr(1))
txtSurname.Text = dr.Item("LastName")
txtFirstName.Text = dr.Item("FirstName")
End While
dr.Close()
dr.Dispose()
conn.Close()
|
|
|
|
|
If you're not getting any results from the query, then there are no matching records in your database. If you think there are, then either you're mistaken, or you're looking at the wrong database.
You need to debug your code; we can't do that for you. Apart from anything else, we don't have access to your database, and we don't know what value you typed in the txtStudentID textbox.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
What exactly is it that you would expect people to be able to do with this?
We don't have your database file so it would fail immediately for us.
Not a single one of my databases have ever had a table named Studenttbl.
We have no idea at all what is in your database so we can't possibly magic one up for you.
Not a single bit of code in my repository of code has anything named "txtStudentID", so your code would not even compile for me.
We can't see your screen so we would have no idea at all what you have typed into the textbox.
YOU and only you can debug your code and find out what values your variables hold. If your teacher didn't teach you how to use the debugger, you need to go back to him and tell him he needs to add that bit to the class. Learning how to use the debugger is not a programming skill that you can just choose not to learn.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
|
|
|
|
|
Good day,
I have a listview that displays in the table format but I will like to have it displayed differently
Example: last Name First Name: Middle Initial Address
Mark Mary A No 5 Thomson
I will prefer to have is display as shown bellow,
Last Name: Mark
First Name: Mary
Middle Initial: A
Address No 5 Thomson Street
thanks for your help
|
|
|
|
|
|
We are trying to run automation test cases using VSTS CI integration, once we are trying to connect azure server from our VM, we are getting below error. Please suggest if any one have any idea. Thanks in advance.
Error occured on '<ip>:<port>'. Details : 'Connecting to remote server <ip> failed with the following error message : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. You can get more information about that by running the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.'. For troubleshooting, refer https://aka.ms/remotevstest.
Regard's
Kaushik
|
|
|
|
|
So what happened when you followed the very clear and detailed troubleshooting instructions in the error message?
Or the instructions in the linked page? vsts-tasks/README.md at master · Microsoft/vsts-tasks · GitHub[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi,
I have a console Application (AppA) which is calling another Console Application (AppV) with Elevated rights, problem is when I run the first Application AppA its opening many Consoles of AppB without limit continuously.
Here is my Code, any advice is going to be very helpful, thanks in advance.
class Program
{
public static int ERROR_CANCELLED { get; private set; }
private static bool IsRunAsAdmin()
{
WindowsIdentity id = WindowsIdentity.GetCurrent();
WindowsPrincipal principal = new WindowsPrincipal(id);
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}
static void Main(string[] args)
{
if (!IsRunAsAdmin())
{
ProcessStartInfo proc = new ProcessStartInfo(@"C:\Personal Docs\FileWatcherBackups\20170221\FileWatcher\FileWatcherScheduleApp\bin\Release\FileWatcherScheduleApp.exe");
proc.UseShellExecute = true;
proc.WorkingDirectory = Environment.CurrentDirectory;
proc.FileName = Assembly.GetEntryAssembly().CodeBase;
proc.WindowStyle = ProcessWindowStyle.Normal;
//proc.FileName = myExePath;
proc.CreateNoWindow = false;
//proc.UseShellExecute = false;
proc.Verb = "runas";
try
{
Process.Start(proc);
}
catch (Win32Exception ex)
{
if (ex.NativeErrorCode == ERROR_CANCELLED)
{ }
else
{ }
}
catch
{
Console.WriteLine("This application requires elevated credentials in order to operate correctly!");
}
Application.Exit();
}
}
}
Where am I going wrong, is there any way I can control the calling of AppB from AppA here?
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
That code will only make a single attempt to launch AppB.exe. So whatever your using to launch AppA.exe is what's causing this problem.
Also, that "Application.Exit()" is not required at all.
|
|
|
|
|
All I am doing is either running the AppA.exe from Visual Studio or right clicking the AppA.exe and saying run as an Administrator or just saying Run, in both the cases its ending up opening unlimited number of Consoles of AppB.exe.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Ummm.... most of the options you're setting in the ProcessStartInfo object are the default values. The only things you're actually changing are Filename (more on this in a second) and Verb. Everything else you're setting the values to their default values. You're really not changing anything there.
The Filename you're changing is your problem. The Assembly.GetEntryAssembly().CodeBase returns the fill filepath TO YOUR APPA.EXE LAUNCHER!! You're Launcher is relaunching itself and then quitting. A simple trip through the debugger would have told you that!
YOU NEVER LAUNCH APPB.EXE!
modified 8-May-17 10:33am.
|
|
|
|
|
Thanks Dave, I would definitely follow it up, thanks again man.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Hello to all,
I'm writing an application using C# in VisualStudio 2008 for Windows Embedded Compact 7 operating system, that is a SmartDevice application.
I have a Form and a UserControl.
In the Form load event I create a UserControl instance and I put it in the form:
private void Form1_Load(object sender, EventArgs e)
{
UserControl1 uc1 = new UserControl1();
uc1.Parent = this;
uc1.Location = new Point(607, 350);
}
This works.
I want also to write a string in the UserControl from Form1.
I tried writing the following function in the UserControl:
public void SetText(String testo)
{
Graphics gr;
PaintEventArgs e;
gr = CreateGraphics();
Font f = new Font("Tahoma", 14, FontStyle.Bold);
e = new PaintEventArgs(gr, ClientRectangle);
SolidBrush br = new SolidBrush(System.Drawing.SystemColors.ControlText);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Center;
Rectangle centered = e.ClipRectangle;
centered.Offset(0, (int)(e.ClipRectangle.Height - e.Graphics.MeasureString(testo, f).Height) / 2);
e.Graphics.DrawString(testo, f, br, centered, sf);
}
and I called it from Form1:
private void Form1_Load(object sender, EventArgs e)
{
UserControl1 uc1 = new UserControl1();
uc1.Parent = this;
uc1.Location = new Point(607, 350);
uc1.SetText("1");
}
but it doesn't work, it writes nothing without errors.
So I modified the function in the UserControl in this way:
public void SetText(String testo, PaintEventArgs e)
{
Graphics gr;
gr = CreateGraphics();
Font f = new Font("Tahoma", 14, FontStyle.Bold);
SolidBrush br = new SolidBrush(System.Drawing.SystemColors.ControlText);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Center;
Rectangle centered = e.ClipRectangle;
centered.Offset(0, (int)(e.ClipRectangle.Height - e.Graphics.MeasureString(testo, f).Height) / 2);
e.Graphics.DrawString(testo, f, br, centered, sf);
}
and I called it in this way:
private void Form1_Load(object sender, EventArgs e)
{
UserControl1 uc1 = new UserControl1();
uc1.Parent = this;
uc1.Location = new Point(607, 350);
PaintEventArgs ea;
Graphics gr;
gr = CreateGraphics();
ea = new PaintEventArgs(gr, uc1.ClientRectangle);
uc1.SetText("1", ea);
}
still doesn't work without errors.
If I use the same code in the UserControl Paint event it works:
private void UserControl1_Paint(object sender, PaintEventArgs e)
{
Font f = new Font("Tahoma", 14, FontStyle.Bold);
string s = "1";
SolidBrush br = new SolidBrush(System.Drawing.SystemColors.ControlText);
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Center;
Rectangle centered = e.ClipRectangle;
centered.Offset(0, (int)(e.ClipRectangle.Height - e.Graphics.MeasureString(s, f).Height) / 2);
e.Graphics.DrawString(s, f, br, centered, sf);
}
It works also if I call the SetText function from the UserControl Paint Event:
private void UserControl1_Paint(object sender, PaintEventArgs e)
{
SetText("1");
}
or:
private void UserControl1_Paint(object sender, PaintEventArgs e)
{
SetText("1",e);
}
I think the problem could be in the PaintEventArgs: when I work inside the UserControl Paint event I have the "right" PaintEventArgs objec, when I try to write my string from Form1 I'm not able to point to the "right" PaintEventArgs.
Obviously my suspicion can be wrong.
I don't know how to solve this problem, someone can help me?
Thanks in advance.
|
|
|
|
|
You do NOT put the Graphics and Drawing code in SetText. That goes in the Paint event of your UserControl.
SetText should only set a private field that contains the text to paint and then call Invalidate on itself to get the control to repaint itself.
Your code also leaks resources badly. You're not calling Dispose on the GDI objects (Graphics, Brush, Pen, ...) that you're creating. You'll eventually run Windows out of handles and it'll start acting weird and crash.
|
|
|
|