|
can you send me the code coz i am new to this deployment project plz.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
private static void CreateDBAndTables(SqlConnection sqlCon)
{
string[] SqlLine;
Regex regex = new Regex("^GO", RegexOptions.IgnoreCase | RegexOptions.Multiline);
string txtSQL = GetScript("createDB.sql");
SqlLine = regex.Split(txtSQL);
ExecuteSql(sqlCon, SqlLine);
}
private static void ExecuteSql(SqlConnection sqlCon, string[] SqlLine)
{
SqlCommand cmd = sqlCon.CreateCommand();
cmd.Connection = sqlCon;
foreach(string line in SqlLine)
{
if(line.Length>0)
{
cmd.CommandText = line;
cmd.CommandType = CommandType.Text;
try
{
cmd.ExecuteNonQuery();
}
catch(SqlException)
{
break;
}
}
}
}
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
can you plz send me step by step process to creating this setup file. I want user has to input the database server server name (select from dropdown box), user name and password thru installation shield.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Hello
Any one knows how to wrap the text in firefox and IE using stylesheet ? I have independent code that works for firefox but not for IE.
|
|
|
|
|
in your CSS u can write this.
Making {overflow: hidden;} would cut the overflow off, and {overflow: auto;} would cause the overflow to enable scrolling.
Thanks,
Sun Rays
|
|
|
|
|
Hello
Sun Rays wrote: Making {overflow: hidden;} would cut the overflow off, and {overflow: auto;} would cause the overflow to enable scrolling.
This method will work fine in Firefox. But in IE it is not working. I want to wrap the contents inside pre tag.
|
|
|
|
|
we are using pre tag to display data in our format. but as u need word wrap in IE as well as in Firefox then u try for div. and apply CSS to div only.
Thanks,
Sun Rays
|
|
|
|
|
Hi i am if i have the second date then i will use query.....,
But i dont have second date...........,
Just my input is intime and outtime only...........
with that i want to calculate for night shift work hours..........
see my ques is i have intime(19:45) and outtime(8:53)
so if i use time span then i am getting value (10:59)
but exact answer is (13:08)
i need difference between two times.............
Magi
|
|
|
|
|
then in time of night shift add 24 hours with your outtime
outtime.AddHours(24)
now place your subtraction code
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
"outtime.addhoutrs(24)"exactly its working really thanks lot........,
Magi
|
|
|
|
|
Hi,
You can check whether the second time is smaller than the first time. If it is smaller construct a date (for second time) with 1 days added to the date of the in-time. In this way, you will have these dates-
consider todays date is 1/1/2007
In-time is 19:45
Out-Time is 8:53
Now the Out-time is lesser than in-time, hence your new in and out times will be -
In-Time : 1/1/2007 19:45
Out-Time : 1/2/2007 10:59
Now if you subtract in time from out time, you should get the correct answer.
Note that all the dates are specified in MM/DD/YYYY format. you will have to keep the formats same, since you are going to construct a date from scrap.
Hope you got my logic ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi,
i am assigning my textbox values to a string builder obj and i am sending that as a body of mail.what my problem is if the text box is multiline i am getting in my body of the mail is a single line with spaces.i want to get that in the exact format what i have written in the multiline textbox.
with regards
Anu
|
|
|
|
|
Dont repost.
Regards,
Satips.
|
|
|
|
|
|
You can delete this post
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
i have a modal dialog,which showing "web page dialog" on the title bar.
how can i change the default title name.
thks
|
|
|
|
|
Convert word doc to pdf
How can I convert a word doc uploaded by the user to a pdf?
How can I store the converted pdf in the database?
am using asp.net 1.1 and vb.net
Nina
|
|
|
|
|
hi,
here is one link of site from where any word doc can converted to pdf. check it out.
http://www.doc2pdf.net/
Thanks,
Sun Rays
|
|
|
|
|
i would first like to apologize for the many question i paste in the forum about providers however i feel that they are different and are importatnt for me >.<
please correct my definition of provider(standard provider and custom provider) if u feel its wrong
my definition of provider is that it will create a database either locally or remitely if the database its looking for does not exist.
and that if i use a custom provider meaning it will create the database depending on how i define it.
above is what i need to know to understand wat a provider is
what i need to know for my project is weather i can configure a custom provider to save username password in a single table(instead of the default 1) which i create(as i only require 1 table for the user information
|
|
|
|
|
hi
i have login form in that i am taking two fields
UserId and Password.
when i enter password in text box after that how can store password in sql databse table in binary format.
In my sql database i take feilds --
CREATE TABLE tUser
(
UserCode NUMERIC(8) NOT NULL
, UserID VARCHAR(20) NOT NULL
, FirstName VARCHAR(40) NOT NULL
, LastName VARCHAR(40) NOT NULL
, Password VARBINARY(60) NOT NULL
, UserType VARCHAR(20) NOT NULL
, ExpireDays NUMERIC(3) NULL
, WarningDays NUMERIC(3) NULL
, StatusCode VARCHAR(1) NOT NULL
, CreatedBy VARCHAR(10) NOT NULL
, CreateDate DATETIME NOT NULL
, UpdatedBy VARCHAR(10) NULL
, UpdateDate DATETIME NULL
, FullName VARCHAR(60) NOT NULL
)
GO
CREATE UNIQUE CLUSTERED INDEX tUser_idx ON tUser (UserCode)
i am new in asp.net so pls give me a code with details.
gayatri
Gayatri
|
|
|
|
|
Dont repost .
Regards,
Satips.
|
|
|
|
|
hi,
whats wrong with you ? why u are posting same post again and again as new post ?
We all are here to help anybody but please take care of this.
Thank if you understand it.
Thanks,
Sun Rays
|
|
|
|
|
Hi,
How to create ASP.Net deployemnt with no source code
JK
|
|
|
|
|
krishnaklm wrote: How to create ASP.Net deployemnt with no source code
Here[ ^] is the Setup for Web Deployment. Good way of web deployment.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi friends
My code is:
public class database<br />
{<br />
<br />
public database()<br />
{<br />
}<br />
public static object ExecuteScaler(string constr, string cmdText, params object[] paramValue) {<br />
if (paramValue != null && paramValue.Length > 0)<br />
{<br />
SqlParameter[] cmdParameter = SetParameter(constr, cmdText);<br />
Assignparameter(cmdParameter, paramValue);<br />
SqlConnection con = new SqlConnection(constr);<br />
con.Open();<br />
return ExecuteScaler(con, cmdText, CommandType.StoredProcedure, cmdParameter);<br />
}<br />
else<br />
return ExecuteScaler(constr, cmdText, CommandType.StoredProcedure);<br />
}<br />
<br />
<br />
public static SqlParameter[] SetParameter(string constr, string cmdtext) {<br />
using (SqlConnection con = new SqlConnection(constr))<br />
using (SqlCommand cmd = new SqlCommand(cmdtext, con))<br />
{<br />
con.Open();<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
SqlCommandBuilder.DeriveParameters(cmd);<br />
cmd.Parameters.RemoveAt(0);<br />
SqlParameter[] cmdparameter = new SqlParameter[cmd.Parameters.Count];<br />
cmd.Parameters.CopyTo(cmdparameter, 0);<br />
return cmdparameter;<br />
}<br />
}<br />
<br />
<br />
public static void Assignparameter(SqlParameter[] cmdparameter, object[] ParameterValue)<br />
{<br />
if ((cmdparameter == null) || (ParameterValue == null))<br />
return;<br />
if (cmdparameter.Length != ParameterValue.Length)<br />
throw new ArgumentException("Argument Error");<br />
for (int i = 0, j = cmdparameter.Length; i < j; i++)<br />
cmdparameter[i].Value = ParameterValue[i];<br />
<br />
}<br />
<br />
<br />
public static object ExecuteScaler(SqlConnection con, string cmdtext, CommandType cmdtype, params SqlParameter[] cmdparams) {<br />
SqlCommand cmd = new SqlCommand();<br />
Preparecmd(cmd, con, (SqlTransaction)null, cmdtype, cmdtext, cmdparams);<br />
object retval = cmd.ExecuteScalar();<br />
cmd.Parameters.Clear();<br />
return retval;<br />
<br />
}<br />
<br />
<br />
public static void Preparecmd(SqlCommand cmd, SqlConnection con, SqlTransaction sqlT, CommandType cmdType, string cmdtext, SqlParameter[] cmdParams)<br />
{<br />
if (con.State != ConnectionState.Open)<br />
con.Open();<br />
cmd.Connection = con;<br />
cmd.CommandType = cmdType;<br />
cmd.CommandText = cmdtext;<br />
if (cmdParams != null)<br />
AttachParameter(cmdParams, cmd);<br />
return;<br />
}<br />
<br />
<br />
public static void AttachParameter(SqlParameter[] cmdparamsvalues, SqlCommand cmd)<br />
{<br />
foreach (SqlParameter pp in cmdparamsvalues)<br />
{<br />
if (pp.Direction == ParameterDirection.InputOutput && pp.Value == null)<br />
pp.Value = DBNull.Value;<br />
<br />
cmd.Parameters.Add(pp);
}<br />
<br />
}
Error is: The SqlParameter is already contained by another SqlParameterCollection.
First i cal ExecuteScaler Method.
Plz help me out.
Thanks in advance
Pathan
GOD HELP THOSE WHO HELP THEMSELves
|
|
|
|