|
hi lippie: but this is what client needed...so do u have any solution for that...or may be another method to do that.
|
|
|
|
|
Refer to point 2. You are in the wrong place. The ASP.NET forum is more appropriate.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
The following code is not compiling in .Net 1.1
[code]
This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#include <ocilib.h>
#using <mscorlib.dll>
using namespace System;
int _tmain(int argc, char *argv[])
{
OCI_Connection* cn;
OCI_Statement* st;
OCI_Resultset* rs;
int Counter = 0;
int ret;
FILE *TablesFile;
char *Database, *UserName, *UserPassword, *StartDate, *EndDate;
char Message[256] = "";
/* for (i=0; i<argc;> * {
* printf("%d %s\n", i, argv[i]);
* }
*/
Database = argv[1];
UserName = argv[2];
UserPassword = argv[3];
StartDate = argv[4];
EndDate = argv[5];
OCI_Initialize(NULL, NULL, OCI_ENV_DEFAULT);
cn = OCI_ConnectionCreate(Database, UserName, UserPassword, OCI_SESSION_DEFAULT);
st = OCI_StatementCreate(cn);
sprintf(Message, "select MemNumber,Turnover from (select mem_number MemNumber,sum(trans_turnover) Turnover from members join transact on mem_number = trans_code where Trans_date between '%s' and '%s' and mem_barred = 0 group by mem_number order by turnover desc ) where rownum <=200", StartDate, EndDate);
// printf("%s\n",Message);
OCI_ExecuteStmt(st, Message);
// OCI_ExecuteStmt(st,"select MemNumber,Turnover from (select mem_number MemNumber,sum(trans_turnover) Turnover from members join transact on mem_number = trans_code where Trans_date between '01-Jan-2004' and '14-Oct-2008' and mem_barred = 0 group by mem_number order by turnover desc ) where rownum < 201");
rs = OCI_GetResultset(st);
// printf("OCI_GetResultset() returns rs = %x\n", rs);
TablesFile = fopen("Tables.html", "wt");
while (OCI_FetchNext(rs))
{
fprintf(TablesFile, "% 4d - %u\n", ++Counter, OCI_GetDouble(rs, 1));
}
ret = fclose(TablesFile);
OCI_Cleanup();
return EXIT_SUCCESS;
}
[/code]
.Net returns C1004: unexpected end of file found
and as hard as I look I cannot see a missing or additional brace.
|
|
|
|
|
It's an additional brace, and it is not C#. I suggest you try the C++ (or the Managed C++ one).
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi,
I want to use Roman 10 cpi font for the Dot Matrix Printer for our crystal reports fast printing . But
because it is not a True Type Font dot net does not support it. How can I use it?
Rajesh
|
|
|
|
|
Hi all,
i got problem on session tracking using asp.net with c#.net.I need use session when user login into my website.
thank you.
%#&kmpYrlHSGYG5@#($_+!@!(*JASnjshdk,cm_0ashjhdbn@#$!48mkhfbchsh))^%#W%&@YW7wsdfjw789';'][]\`~JKJQ4$!@#~)-HSKS^&*1)JK12@#@$~!1`DFGkqp][]\]?Zas;EWRG%!@~)(^&BVAG
|
|
|
|
|
Could you tell us what your problem is?
|
|
|
|
|
here is my source code whn login button clicked..
can you check for me..
private void Button1_Click(object sender, System.EventArgs e)
{
switch (UserLogin(usertxtname.Text, usertxtpass.Text))
{
case 1:
Session.Abandon();
Login();
break;
case 2:
Label4.Text = "Incorrect Password";
break;
case 3:
Label4.Text = "Incorrect Username";
break;
}
}
public void Login()
{
FormsAuthenticationTicket objTicket = null;
HttpCookie objCookie = null;
string strReturnURL = null;
objTicket = new FormsAuthenticationTicket(1, usertxtname.Text, System.DateTime.Now, DateTime.Now.AddMinutes(60), false, Session.SessionID);
objCookie = new HttpCookie(".ASPXAUTH");
objCookie.Value = FormsAuthentication.Encrypt(objTicket);
Response.Cookies.Add(objCookie);
strReturnURL = Request.QueryString["ULogin.aspx"];
if (strReturnURL != null)
Response.Redirect("ULogin.aspx");
else
Response.Redirect("registration.aspx", false);
}
public int UserLogin(string strUsername, string strPassword)
{
int iReturnValue = 0;
string sql;
OdbcConnection myconn;
OdbcDataReader MyReader = null;
sql="Select count(*) as expr1 From login Where (pword='"+usertxtpass.Text+"')And(uname='"+usertxtname.Text+"')";
myconn= new OdbcConnection ("DSN=myodbc2;SERVER=localhost;DATABASE=misdb;UID=root;PORT=3306");
OdbcCommand cmd = new OdbcCommand(sql, myconn);
cmd.Parameters.Add("@username", strUsername);
cmd.Parameters.Add("@password", strPassword);
cmd.Parameters.Add("@ReturnValue", OdbcType.Int).Direction = ParameterDirection.ReturnValue;
myconn.Open();
MyReader=cmd.ExecuteReader();
MyReader.Read();
iReturnValue = System.Convert.ToInt32(cmd.Parameters["@ReturnValue"].Value.ToString());myconn.Close();
return iReturnValue;
}
%#&kmpYrlHSGYG5@#($_+!@!(*JASnjshdk,cm_0ashjhdbn@#$!48mkhfbchsh))^%#W%&@YW7wsdfjw789';'][]\`~JKJQ4$!@#~)-HSKS^&*1)JK12@#@$~!1`DFGkqp][]\]?Zas;EWRG%!@~)(^&BVAG
|
|
|
|
|
Eduard asked what your PROBLEM is not for a code dump.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
hi
I want to create a website for seaching some details through websites using some particular keywords.Can you give me an idea for creating this.
Thanks in advance
Rasma
|
|
|
|
|
Member 4124915 wrote: Can you give me an idea for creating this.
Yes, ask it here[^]
While (true) { Human.isLearnable = true; }
|
|
|
|
|
I understand you can't just set the database to '' or null, but how can you do this when you dynamically generate the sql? Here is a example which I know does not work
SqlDateTime sqldatenull;<br />
<br />
if (tmpDate == "")<br />
tmpDate = sqldatenull;<br />
<br />
sqlQuery = "INSERT INTO Event (";<br />
sqlQuery += "Event_ID";<br />
sqlQuery += ", Event_Date";<br />
sqlQuery += ") VALUES (";<br />
sqlQuery += "'" + tmpID + "'";<br />
sqlQuery += ", '" + tmpDate + "')";
|
|
|
|
|
1st) Write your query this way:
sqlQuery = string.Format("INSERT INTO Event (Event_ID, Event_Date) VALUES ('{0}', '{1}')", tmpID, tmpDate);
2nd) Use System.Data.SqlTypes.SqlDateTime.Null;
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Just don't insert the value...
sqlQuery = "INSERT INTO Event (";
sqlQuery += "Event_ID";
sqlQuery += ") VALUES (";
sqlQuery += "'" + tmpID + "'";
sqlQuery += ")";
Also, it would be neat to use a StringBuilder..
|
|
|
|
|
Why are you generating this SQL? This is a really, really, really bad idea. I can't stress enough, how bad this idea really is. By doing this, you've left your database open to SQL Injection Attacks.
|
|
|
|
|
Can you give me a example of the best way to stop sql injections? I am using SQL Server 2005 (Express) which the best option would be to use Stored Procedures?
|
|
|
|
|
Please read this[^] article.
|
|
|
|
|
Hi,
I have created a Webpage, and on the click of a certain link i want to run a unicast stream from VLC giving an output of RTSP.
Please help.
Regards
|
|
|
|
|
Head off to the ASP.NET forum.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
In my C# editor space and Tab are filled by dots. How can I change this?
Can any one help me?
thanks to all.
|
|
|
|
|
Use Ctrl + R, Ctrl + W
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|
|
Cool. I never knew this. Wonder what the point of it is
Simon
|
|
|
|
|
It might help to get lines aligned. I have never used it though.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|