Click here to Skip to main content
14,738,360 members

Comments by Member 11586797 (Top 39 by date)

Member 11586797 20-Feb-18 4:15am View
   
Thanks for replying.Yes, exactly that's what i want. but can i get a SQL script only for doing this. as i am not writing any SSIS package for it.
Because Using SSIS package would require a dll Interop to be included and this Interop will not work on my production server.

So it wud be so nice of you if i can get the sql script inly
Member 11586797 20-Feb-18 2:23am View
   
Deleted
so i am using the below query in Store proc to load my excel

SELECT @sql = 'SELECT
*
FROM OPENROWSET(''Microsoft.ACE.OLEDB.12.0'','''

+ @connString + ''',''select * from [report1518044317630$]'')';

so you see "report1518044317630" worksheet name changes every time i got an excel to load it . so i want to fetch this worksheet name on run time. whatever it may be , my store Proc must read this worksheet name on run time and load my excel into the database
Member 11586797 20-Feb-18 2:23am View
   
Deleted
I want to load an excel into the sql database. but the excel's worksheet name changes every time, as the excel file is system generated. so, i want to access the worksheet name on run time, without using linked server code.
Member 11586797 20-Feb-18 1:53am View
   
Deleted
so i am using the below query in Store proc to load my excel

SELECT @sql = 'SELECT
*
FROM OPENROWSET(''Microsoft.ACE.OLEDB.12.0'','''

+ @connString + ''',''select * from [report1518044317630$]'')';

so you see "report1518044317630" worksheet name changes every time i got an excel to load it . so i want to fetch this worksheet name on run time. whatever it may be , my store Proc must read this worksheet name on run time and load my excel into the database
Member 11586797 20-Feb-18 1:50am View
   
Deleted
I want to load an excel into the sql database. but the excel's worksheet name changes every time, as the excel file is system generated. so, i want to access the worksheet name on run time, without using linked server code.
Member 11586797 2-Jun-15 2:57am View
   
Deleted
ya got it
THANX
Member 11586797 26-May-15 1:44am View
   
SHOWING THIS ERROR

(23 row(s) affected)
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '<'.
Msg 102, Level 15, State 1, Procedure InsertData, Line 9
Incorrect syntax near '@Gender'.
Msg 137, Level 15, State 2, Procedure InsertData, Line 15
Must declare the scalar variable "@Age".
Msg 137, Level 15, State 1, Procedure InsertData, Line 17
Must declare the scalar variable "@Identity".
Msg 137, Level 15, State 2, Procedure InsertData, Line 18
Must declare the scalar variable "@Identity".
Member 11586797 22-May-15 3:06am View
   
actually the values are getting into the database , but when i m this string query into the sql server it is showing this message...Incorrect syntax near 'Name'.
Member 11586797 22-May-15 2:49am View
   
it is done already
Member 11586797 22-May-15 2:48am View
   
it is done already
Member 11586797 22-May-15 2:39am View
   
still same error--Must declare the scalar variable "@Name"
Member 11586797 22-May-15 2:29am View
   
Must declare the scalar variable "@Name". now sql server giving this error
Member 11586797 11-Apr-15 5:19am View
   
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The server tag is not well formed


this is d error
Member 11586797 9-Apr-15 17:12pm View
   
SEx of a employee whether he is a male or a female
Member 11586797 9-Apr-15 17:07pm View
   
then what will i write
Member 11586797 9-Apr-15 17:05pm View
   
actually at radio button list i have given two options
male
female
so i have to select one of these ...how is it possible??
Member 11586797 9-Apr-15 16:34pm View
   
how it will identify data correspond to the id ???
Member 11586797 9-Apr-15 16:33pm View
   
so what shd b d correct form --

emp_Id=@id; dats it ??
Member 11586797 9-Apr-15 16:26pm View
   
i have taken Emp_id as a unique id
Member 11586797 9-Apr-15 16:21pm View
   
okay i got it but i m wonderin what will i write after where clause---

string updateQuery = "update emp_details set emp_name=@name,father_name=@fname,age=@age,sex=@sex,dob=@dob,nationality=@nation,state=@state,city=@city,mobile_no=@mob,exp=@exp,qual=@qual,emp_sal=@sal,email=@email WHERE emp_Id= *what shd i write here* ) ";
Member 11586797 9-Apr-15 16:06pm View
   
it is saying sql xception is unhandled by the user code
Member 11586797 9-Apr-15 16:02pm View
   
u mean to say -----
string updateQuery = "insert into emp_details(emp_name,father_name,age,sex,dob,nationality,state,city,mobile_no,exp,qual,emp_sal,email) values(@name,@fname,@age,@sex,@dob,@nation,@state,@city,@mob,@exp,@qual,@sal,@email) ";

but then will it not create a new database ...instead of updating
Member 11586797 9-Apr-15 16:00pm View
   
Instead of this whole query--------
string updateQuery = "update emp_details(emp_name,father_name,age,sex,dob,nationality,state,city,mobile_no,exp,qual,emp_sal,email) values(@name,@fname,@age,@sex,@dob,@nation,@state,@city,@mob,@exp,@qual,@sal,@email) ";

what should i write????
Member 11586797 9-Apr-15 15:56pm View
   
I am sorry sir , i m confused cant get u...can u xactly tell me what to do
Member 11586797 9-Apr-15 15:55pm View
   
bbut i am already using it as it is
Member 11586797 9-Apr-15 15:54pm View
   
u mean to say ds one-----------

string updateQuery = "update emp_details(emp_name,father_name,age,sex,dob,nationality,state,city,mobile_no,exp,qual,emp_sal,email) values(@name,@fname,@age,@sex,@dob,@nation,@state,@city,@mob,@exp,@qual,@sal,@email) ";
Member 11586797 9-Apr-15 15:51pm View
   
replace ds with what???
Member 11586797 9-Apr-15 15:50pm View
   
---
Member 11586797 9-Apr-15 15:49pm View
   
string updateQuery = "update emp_details(emp_name,father_name,age,sex,dob,nationality,state,city,mobile_no,exp,qual,emp_sal,email) values(@name,@fname,@age,@sex,@dob,@nation,@state,@city,@mob,@exp,@qual,@sal,@email) ";
Member 11586797 9-Apr-15 15:48pm View
   
---
Member 11586797 9-Apr-15 15:47pm View
   
no i want to update only few data among the all..so i have to use update query
Member 11586797 9-Apr-15 15:43pm View
   
how can i do it in aspx.cs code??
Member 11586797 9-Apr-15 15:38pm View
   
i am running ds update query and on update click event it is showng an error dat incorrect syntax near'('
Member 11586797 7-Apr-15 15:57pm View
   
Invalid object name 'emp_deatils'. showing ds error infront of ds.Fill(dt);

now wat to to do??
Member 11586797 7-Apr-15 15:56pm View
   
Invalid object name 'emp_deatils'. showing ds error infront of ds.Fill(dt);

now wat to to do??
Member 11586797 7-Apr-15 15:23pm View
   
now what to do??
Member 11586797 7-Apr-15 15:22pm View
   
ds.Fill(dt); here it is giving an error invalid object name emp_details
Member 11586797 7-Apr-15 14:47pm View
   
thank you it really helped me...thanx a lot
Member 11586797 7-Apr-15 6:00am View
   
Both DataSource and DataSourceID are defined on 'DropDownList1'. Remove one definition.
ds error is shown when d above code is run