5
Answers

Db saves only first letter of the record

aditya immadi

aditya immadi

8y
255
1
i have as serious question.is there any scenario that when we inserting records only first letter of the record inserts.because i m facing it now.while debugging its fine but when i open my DB it shows only first  letters like ..if i insert "answers " in DB it saves like "a" only ...why this can anyone expalin me how to resolve this 
 
Thanks and Regards 
Answers (5)
0
Riddhi Valecha

Riddhi Valecha

NA 3.1k 186.7k 7y

Hi..

Datatable has 4500 records. It is not empty.

 
Yes, I have mentioned all the lines...
 
cmd.CommandType = Stored Procedure 
----------
Hi all...
 
I have one more query.... Instead of WCF Service , now I am asked to do .asmx web service.
 
I need the user to insert the following values -
1. Name - string values - no number 
2. Location - String values
3. Email ID - abc@xyz.com - check if email id is valid
4. Mobile Number - Numeric values
5. Date - date must be greater than current date.
6. Select city from drodownlist.
----------
 For this, I have made -
1. A Class File with get; set properties (UserDetailsProperties.cs - Name of Class File).
2. I have made a method to return Boolean with Class Name as parameter.
public Boolean IsDataIserted(UserDetailsProperties userdetails)
{
cmd = new SQLCommand();
cmd.Parameters.AddWithValues("@Name", userdetails.Name);
int i=cmd.ExecuteNonQuery();
if(i<=0)return true;
else return false;
}
-----------
My Query is -
How do I test this functionality with .asmx service ?
 
http://localhost:12456/UserWebService.asmx - This is the URL.
 
------
And how do I get the output in JSON?
--------------------
 When I upload the webservice in server (iis), then is there a way so that instead of fields , we can have dropdownlist , datetime picker as inputs ?
This is when - we hit the url - http://1.2.3.4/UserDetails/UserWebService.asmx - click on the method and click on "Invoke" button.
------------
Please guide
 -----------------------------------------------
Dear All...
Once again I am stuck up with Basic Authentication of the Web Service...
 
Requirement - When the user hits the URL - http://localhost:34789/WebService1.asmx ; then
1. A popup or method must be displayed -  Please enter Username and Password.
 
2. If the user enters "Riddhi" in Username and "12345" in Password, then the message should be displayed -  Successfully Logged In... and display other Web Methods - Add ,Subtract, Multiply, Divide 
 
3. Else - A message - "Authentication failed" - must be displayed.
 Please guide for this... 
 
 
0
Ankit Sharma

Ankit Sharma

NA 8.8k 141k 7y
Hi riddhi,
 
You might be getting this error coz your datatable is empty.
 
 since you are using a SP, so you need to include following line in GetUserList() method 
 
cmd.CommandType = CommandType.StoredProcedure;
 
Also check if your connection string is valid or not