16,019,740 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12363094 (Top 29 by date)
Member 12363094
17-Jul-17 5:01am
View
do not know in local system working fine but in server not working.
Access to the path is destinationFile\filename1.txt has denied.
Description: An unhandled exception occurred during the execution of the current web request.
Member 12363094
17-Jul-17 4:59am
View
Deleted
do not know in local system working fine but in server not working.
Access to the path is destinationFile\filename1.txt has denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Member 12363094
14-Oct-16 4:20am
View
Actually above one is in sp
@startDate,@EndDate are input parameters with datatype as datetime
Member 12363094
14-Oct-16 3:34am
View
because i have to get between data of startdate and enddate which are datetime
and date column is varchar type
without conversion also i am getting below error
Error converting data type varchar to datetime.
Member 12363094
12-Sep-16 4:35am
View
again wen i change stored proc then i am able to download perfectly
Member 12363094
12-Sep-16 4:34am
View
yeah really when i have run above query in ssms it is coming well
but when i am running application there i am calling this sp at that time i am getting other date date if data is not on that date.
Member 12363094
12-Sep-16 2:48am
View
when i use CONVERT(varchar,convert(date, [Date], 103),101) then it is taking next date data if on that date data is not there
Member 12363094
7-Sep-16 12:25pm
View
thanks but when i applied order by at end of query like urs i was getting error
Member 12363094
7-Sep-16 12:17pm
View
yes
Member 12363094
7-Sep-16 11:25am
View
no [Date] one that is type of varchar
Member 12363094
7-Sep-16 11:20am
View
date=convert(varchar,convert(date,[Date],103),101)
and time is seperate column in rawtable
Member 12363094
7-Sep-16 11:07am
View
i want to use order by in above query if i use this order by i am getting error.
where i have to use orderby column
Member 12363094
7-Sep-16 7:14am
View
convert(varchar,convert(date, [Date], 103),101) this date and time is different column in table
Member 12363094
22-Aug-16 5:32am
View
then i have to convert varchar to float?
Member 12363094
22-Aug-16 5:09am
View
ooh that is varchar type
Member 12363094
22-Jul-16 2:52am
View
Hi thanks it is working fine
Member 12363094
26-May-16 4:20am
View
getting exception like "object has not sent for instance"
Member 12363094
26-May-16 4:18am
View
sorry i have removed that line
this is orginalcode with classes.
This is Main Class
namespace ConsoleApplication1
{
public class Main
{
public static int BURD_RATE;
public static int DATABITS;
public static int STOPBITS;
public static String comPort = "";
public Main()
{
BURD_RATE = 9600;
DATABITS = 8;
STOPBITS = 1;
comPort = "COM3";
}
public void initializeModem()
{
Boolean modemStatus = false;
try
{
Port.open(BURD_RATE, DATABITS, STOPBITS, comPort);
do
{
if(modemStatus)
{
break;
}
modemStatus = SmsUtil.initializeModem();
if(!modemStatus)
{
Console.WriteLine("AT Command is not responding. So going to reconnect the port once again.\n");
if (Port.Serial1 != null)
{
Port.close();
}
Port.open(19200, 8, 1, "COM1");
}
} while(true);
Port.isReading = true;
// ReadSMS readSMS = new ReadSMS();
// readSMS.readSMS();
}
catch(Exception e)
{
try
{
if (Port.Serial1 != null)
{
Port.close();
}
}
catch(Exception ex)
{
Console.WriteLine("Exception:"+ex);
}
}
}
public static void main(String[] args)
{
Main main = new Main();
main.initializeModem();
}
}
2.This is Port Class
class Port
{
public static Boolean isReading = false;
public static Boolean isSending = false;
public static SerialPort Serial1;
public static string s;
public Port()
{
}
public static void open(int boardRates, int dataBits, int stopBits, String comPort)
{
try
{
Console.WriteLine("Trying to open port...");
SerialPort Serial1 = new System.IO.Ports.SerialPort(comPort, boardRates, Parity.None, dataBits);
Serial1 = new System.IO.Ports.SerialPort(comPort);
Serial1.Open();
Serial1.Encoding = Encoding.GetEncoding("iso-8859-1");
Console.WriteLine("Port is opened successfully..... \n");
// Thread.Sleep(10000);
}
catch (Exception e)
{
Console.WriteLine((new StringBuilder()).Append("could not open port:").Append(e).Append(" ").Append(comPort).ToString());
//System.Exit(0);
}
}
public static String sendAT(String atcommand)
{
try
{
Thread.Sleep(500);
writeln(atcommand);
Thread.Sleep(500);
s = read();
Thread.Sleep(500);
}
catch(Exception e)
{
}
return s;
}
public static void write(string s)
{
Serial1.Write(s);
// Serial1.Flush();
}
public static void write(char[] s)
{
Serial1.Write(s,0,13);
// Sout.Flush();
}
public static void writeln(string s)
{
Console.WriteLine(s);
Serial1.WriteLine(s);
// Serial1.Write(13);
// Sout.Flush();
}
public static string read()
{
// Requires that the data is en
Member 12363094
26-May-16 0:36am
View
that Port is a class not serialport
in that writeln is method.
i have only one port that is serial1
Member 12363094
25-May-16 23:42pm
View
but in my solution i am getting "object reference has not set " runtime exception
when i was writing serialport.write(s);
public static Boolean atCommandCheck()
{
String s1 = " ";
try
{
Port.writeln("AT");
//Thread.Sleep(1000);
s1 = Port.read();
}
catch(Exception e)
{
Console.WriteLine((new StringBuilder()).Append("Exception in atCommandCheck(AT Command Checking)..........").Append(e.Message).ToString());
s1="OK";
}
Console.WriteLine((new StringBuilder()).Append("AT..................").Append(s1).ToString());
return s1.IndexOf("OK") >= 0;
}
above one is in sms class i am calling writeln method from another class
public static void writeln(String s)
{
Serial1.Write(s);
}
in this case i was not able to write command to serial port
Member 12363094
25-May-16 7:15am
View
then how to convert
out = new OutputStreamWriter(port.getOutputStream(), "ISO-8859-1");to dotnet
Member 12363094
25-May-16 6:45am
View
above code i have mention streamreader sout=null& streamwriter sin=null;
wen i was sending AT commands(modem) to port then i have to use like
sout.write(AT).
in this case i am getting null reference exception
Member 12363094
25-May-16 6:42am
View
Console.WriteLine("Trying to open port...");
Console.WriteLine(comPort);
port = new System.IO.Ports.SerialPort(comPort);
port.Open();
SerialPort Serial1 = new System.IO.Ports.SerialPort(comPort, boardRates, Parity.None, dataBits);
port.Encoding = Encoding.GetEncoding("iso-8859-1");
Console.WriteLine("Port is opened successfully..... \n");
Thread.Sleep(10000);
Member 12363094
1-May-16 1:21am
View
hi sorry in code u have given false instead of true.
now working fine .Thank u so much
Member 12363094
1-May-16 1:17am
View
i have tried with ur solution but still that button is enable once we clicked otherthan that every thing is working fine.
Member 12363094
1-May-16 1:14am
View
Hi i have tried with ur solution but i was not able to disable a button.still that is enable
Member 12363094
1-May-16 0:45am
View
i want to invoke some link(href functionality) when i clicked on button.
what u understood is correct.
Member 12363094
1-May-16 0:43am
View
after clicking on button i can able to open link on other window also.
i am having problem with when we clicked on button that should be disable
Member 12363094
1-May-16 0:30am
View
that is not adding same line in that input tag
Onclick="window.open('http://www.google.co.in/')"
Show More