|
Try this:
strBody = "Mr Brendan Vogt wrote:" & vbCrLf & "Australian Chris du Toit, is one of the most affable athletes in the sport of triathlon." & vbCrLf & vbCrLf & "Chris took the World No. 1 position and destroyed arguably the greatest field ever assembled in triathlon, to win both the 1997 Triathlon World Championships and the 1997 ITU World Cup Series."
|
|
|
|
|
Hi Brendan,
If you are using .net you can replace all your crlf's with
Environment.NewLine
or you can use
\r\n
as well
regards
vaibhav dhandarphale
|
|
|
|
|
Hi there,
I'm using classic ASP!!
I have an input textfield which does not require value in my SQL server database. So it is defined as to allow null values.
So, if the textfield is empty, I do the following check to make it null when adding it to the database. I don't like inserting empty strings:
Dim strDialCode
If Trim(Request.Form("txtDialCode")) = "" Then
strDialCode = Null
Else
strDialCode = Request.Form("txtDialCode")
End If
In my CreateParameter I have the following, which I am not sure if I am doing it correctly:
objCmd.Parameters.Append objCmd.CreateParameter("@ContactDialCode", adWChar, adParamInput, Len(strDialCode), strDialCode)
Basically what should happen is it must be able to accept values, and null values.
In my stored procedure (just a part is displayed) it is defined as follwoing:
CREATE Procedure sp_InsertContact
(
@ContactID nvarchar(16),
@ContactFName nvarchar(50),
@ContactLName nvarchar(50),
@ContactDialCode nvarchar(10),
@ContactTelephone nvarchar(20)
)
INSERT INTO tblContact
(
ContactID_PK,
TitleID_FK,
ContactFName,
ContactLName,
ContactDialCode,
ContactTelephone
)
VALUES
(
@ContactID,
@TitleID,
@ContactFName,
@ContactLName,
@ContactDialCode,
@ContactTelephone
)
GO
Any help or advice will be greatly appreciated!
Cheers.
Brendan
|
|
|
|
|
I am afraid I do not understand the question, but your parameters in stored procedure - shouldn't you be using something like:
@middlename NVARCHAR(255) = NULL
|
|
|
|
|
What I am trying to say is... If the textbox is empty, a null should be written to the database field. So, if I pass the null contained variable to the CreateParameter method, then I get errors. I want to test for nulls before I go to the database.
|
|
|
|
|
ok....
try isNull or isEmpty ...one of them should work! gosh, it's been a while since I used vb!
|
|
|
|
|
Lets say I have a textfield called txtTel. This is an optional field as the user doesn't have to enter a value. So if the nothing is entered I do a small test, something like:
Dim strTel
If Trim(Request.Form("txtTel")) = "" Then
strTel = Null
End If
Then I use this strTel value in my CreateParameter as a parameter. And because it is null, it doesn not work. It does work if if I make strTel = "".
Cheers
Brendan
|
|
|
|
|
can you just not include that parameter in your sql statement?
<br />
If Trim(Request.Form("txtDialCode")) = "" Then<br />
' do nothing<br />
Else<br />
objCmd.Parameters.Append objCmd.CreateParameter("@ContactDialCode", adWChar, adParamInput, Len(strDialCode), strDialCode)<br />
End If<br />
/jason
|
|
|
|
|
I want to create a perl script.
If we run perl script at the end of the day it should check which all users copied, moved or removed the files on the unix server (i.e. the script would be run on unix server). Suppose there r 10 users.
In short i want to know who all used the cp, mv or rm command at the end of the day.
Plz. let me know as soon as possible
Is it possible
|
|
|
|
|
Which shell are you using? I know with bash, as well with others, there is a history file of commands used by a specific user. It would be easy to write a script that would read that and then wipe it out when finished...assuming your shell has a history file, that is.
|
|
|
|
|
My boss would like make peer evaluations done on an electronic basis, he needs each employee to fill out a form like:
-your name "tom"- -person being evaluated's name "bob"-
q1 - response
q2 - response
ect...
The admin should then be able to do a search for "bob" and then a summary report will be made with the questsions asked and every ones responses about "bob"
q1 - "bill's response"
- "tom's response"
but none of the submitted reports should be accesible to other users besides the admin. So how can one submit something then not have access to it? i know its a simple problem but.... gah.. We are on a lan so right now i need to figure out how to keep the users out of a dir but allow them to submit to that dir.... any ideas?
|
|
|
|
|
Backend database with admin group and user group, where admin will have full access and users limited?
A web form with login for admin and users and dispaly summaries only for admin? Remember, when a user "submits", the page is processed on the server side and you can do a lot on the server!
There is more than one way to handle this...some of the others may have some suggestions too.
|
|
|
|
|
thanks guys, i think i've actually found out how to do it, since its on an intrAnet and not public access. I'ma using frontpage (srry... *crys*) to make a .asp page that will submit to a database and I will be using PHP to retrieve info for later reports.
|
|
|
|
|
Hi, all
I want some Design templet to develope web site to use it ...........
so plz send it to me...
samir vohra...
samir_i_vohra@yahoo.com
plz put subjetc line same...boss
|
|
|
|
|
No-one is going to send an email to an anonymous poster. If you don't care enough about this site to register, or even come back to read our replies, why would we bother ?
Your question doesn't make sense to me. What do you want, a design template to build a website in terms of the look and feel ? Using what language ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can google for template and free .
<italic>Work hard, Work effectively.
|
|
|
|
|
Can anyone recommend a commercial PDF server product?
Apologies for the re-post, first post was in wrong forum.
|
|
|
|
|
Hello all
I am redirect the user to the index page as he login but what I have to do is to redirect him to the same page plese help me
neeru
|
|
|
|
|
which page do u want him to redirect ?
i am not getting your question ..can u clarify a bit more ?
Abhijeet Jadhav
|
|
|
|
|
If you meant redirect him after login to the same page that he was in ?
Then use:
RedirectFromLoginPage(); Method in the Authentication class.
|
|
|
|
|
but i am working with asp not with .net
|
|
|
|
|
Will pay experienced programmer to teach me PHP/MySQL. I am a C++ programmer who needs minimal support.
Send brief resume and required hourly rate. We can start 1 hour at a time using Paypal.
I am particularly interested in building a real estate information form which in turn will propagate a MySQL database.
Jim Osborne
josborne@starband.net
|
|
|
|
|
If you remotely know C++, then you're wasting your money. Why do PHP anyhow, are you being forced to ? What's wrong with ASP.NET ? MySQL is pretty crappy too, although it's free for non commercial use, MSDE is just plain free, and kicks it's ass.
I recommend reviewing your architecture of choice, if you have a choice, and then buying some books and asking questions here.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am using PHP/MySQL because it works well and is easy to learn. I need to get a real estate information system on-line ASAP. If I had the time and big bucks I would go with Coldfusion.
Years ago I used MS Sequel Server version 4 with C++. The code was difficult to maintain without ample training and due diligence. I heard MSDE is a much better database but then I have to go down the MS road again.
Thanks for your input.
sundownr
|
|
|
|
|
sundownr wrote:
I am using PHP/MySQL because it works well and is easy to learn.
So easy that you want to pay a tutor....
sundownr wrote:
If I had the time and big bucks I would go with Coldfusion.
What's wrong with doing it with ASP.NET/C# ? If you know C++, that would be a breeze for you.
sundownr wrote:
Years ago I used MS Sequel Server version 4 with C++. The code was difficult to maintain without ample training and due diligence.
The main problem would have been ADO. You think that using a crappy database will help you here ? I doubt it. Does PHP provide a dedicated layer to MySQL ? I doubt it would be as rich or useful as ADO.NET is.
sundownr wrote:
I heard MSDE is a much better database but then I have to go down the MS road again.
And that's bad because ? ASP.NET is simply the only viable choice for web development. PHP was good in it's day, but that day is long gone. ASP was and is a hack. J2EE is just too complex and hard to use. ASP.NET is totally killer, and really easy to learn to use, not to mention that the web abounds with info.
In all seriousness, I guarentee I could develop this site for you in C#/ASP.NET/MSDE much faster than anyone could do it in PHP using MySQL. I think you're making poor choices here, not least because your background in C++ actually empowers you to learn the best web development platform ( and it's totally free, unlike MySQL, which costs money in this case ( unless your real estate information system is theoretical or totally non-profit ).
Christian Graus - Microsoft MVP - C++
|
|
|
|