|
Its a client side encryption as MD5 function is just a javascript function where the salt comes from the server.
|
|
|
|
|
connString = "Provider=SQLOLEDB;Data Source = db.incheonlaw.ac.kr; Initial Catalog=stanlee;User ID=stanlee;Password=stan;";
using (OleDbConnection con = new OleDbConnection(ConnectionString))
using (OleDbCommand cmd = new OleDbCommand(CmdText, con))
{
OleDbParameterCollection pms = cmd.Parameters;
pms.Add("@Writing_Num", OleDbType.VarChar, 50);
pms.Add("@FileName", OleDbType.VarChar, 200);
pms.Add("@FileSize", OleDbType.Integer);
pms.Add("@ContentType", OleDbType.VarChar, 50);
pms.Add("@FileData", OleDbType.VarBinary);
pms["@Writing_Num"].Value = writing_num;
pms["@FileName"].Value = fileName;
pms["@FileSize"].Value = fileLength;
pms["@ContentType"].Value = contentType;
pms["@FileData"].Value = fileData;
pms = null;
con.Open();
cmd.ExecuteNonQuery();
}
All data of Writing_Num, FileName, FileSize, ContentType, FileData are normally operating.
and when debuging "cmd.ExecuteNonQuery()", there is an error message, "Must declare the variable "@Writing_Num"; at this codes:
catch (Exception ex)
{
buffer.Append("<li>Error Occurred: ");
buffer.Append(ex.Message).Append("</li>");
}
|
|
|
|
|
adding cmd.Parameters.AddRange(pms.ToArray()); before con.Open would help
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
There is no ToArray in components of pms.
ERROR!! T^T....
|
|
|
|
|
then add each pms defined to cmd.parameters.Add()
or did you try cmd.parameters.AddRange(pms) ?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
How about not setting pms to null after you've put stuff in it?
var question = (_2b || !(_2b));
|
|
|
|
|
|
better post this in the windows forms forum, not in the ASP forum
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
anandhakrishnan wrote: Pls give me some idea of how to use the sqlprofileprovider
Search Google!
anandhakrishnan wrote: in windows forms applications
This is ASP.NET Forum!
|
|
|
|
|
Hi, I have an image uploading site. Once the user has uploaded the image they are given the direct link like: mysite.com/pics/myimg.jpg and they can direct link to that file from a forum or by just going to the link.
Now is it possible that when they go to the link(as in typing it in the address bar) it displays the picture and then some text content below it. BUT then when they link it like in a forum it still displays the picture fine?
I basically want comments or whatever for pictures but I dont want to have the user given 2 different links, one for hotlinking the other one not.
I have URL Rewriting in place so maybe I could do something with that?
Thanks for the help!
|
|
|
|
|
Maybe you write yourself an ASHX handler [^] to server whatever you want to, i.e. once the image and once the text, depending on the context.
|
|
|
|
|
Is it possible to tell the difference between whether they are visiting the link or viewing it from an img tag?
|
|
|
|
|
Probably by looking at tue referer url.
|
|
|
|
|
Cool, thanks alot. Will go play around
|
|
|
|
|
Hmmmm, ok this works great in the this scenario:
One user adds
|
|
|
|
|
hi ..
I am creating view in sql server 2000 as-
CREATE VIEW vwSam
As
(select admin.*, cust.FirstName+' '+cust.LastName as CustName
from adminmsgrecieved as admin,custdetails as cust
where admin.AdminId='111' and cust.CustId=admin.FromCustId )
From this i am getting an error invalid object adminmsgrecieved.
But when i run select query only then it works fine.
what problem may be???
and what should i do?
plz help me..
Thanx in adv
|
|
|
|
|
Would this help?
It is better to add all admin fields instead of using the * option. If someone else wants to look at the view he knows exactly which fields are in the view.
CREATE VIEW vwSam
As
(
select admin.*, cust.FirstName+' '+cust.LastName as CustName
from adminmsgrecieved as admin
INNER JOIN custdetails as cust on cust.CustId=admin.FromCustId
where admin.AdminId='111'
)
Have you got a Primary Key on field CustID and has FromCustID a Foreign Key to the CustID field?
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
I want to use aspnet membership and roles mananagement in a work I am currently about to do. But a problem I have is with the table names created/used by the roles and membership classes. I want it to be prefixed with "mdt". Is that possible?
|
|
|
|
|
better ask this question in the sql forum. It has to do with system tables to do an action you want.
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
|
You mean to create the db ourselves?
|
|
|
|
|
I'm using asp.net with C#.
and I would like to know how I can file upload to MSSQL.
Is there any sample source??
please let me know.
thank you..
|
|
|
|
|
lsh486love wrote: and I would like to know how I can file upload to MSSQL.
Is there any sample source?
Did you Searched in Google Before post it over here?
One more think, which file do you want to upload in DB? I would suggest to store the path in DB and store the file in Hard Drive.
Thanks !
|
|
|
|
|
I recommend reading the link in my sig, it contains all the information you need.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
http://www.codeproject.com/KB/database/SqlFileStream.aspx
http://www.codeproject.com/KB/database/UploadPicturesSQLServer.aspx
|
|
|
|