Click here to Skip to main content
15,887,214 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: .Net Services Pin
munklefish9-May-06 6:07
munklefish9-May-06 6:07 
QuestionMoving Web Parts without reloading page Pin
dave90879-May-06 5:29
dave90879-May-06 5:29 
Questionread xml string Pin
fmardani9-May-06 4:29
fmardani9-May-06 4:29 
AnswerRe: read xml string Pin
minhpc_bk9-May-06 15:51
minhpc_bk9-May-06 15:51 
QuestionNeed Help - problem with browsers while parsing innerHTML at clientside Pin
akjoshi9-May-06 3:55
akjoshi9-May-06 3:55 
QuestionCheck box in data grid Pin
jaikrishna9-May-06 3:52
jaikrishna9-May-06 3:52 
AnswerRe: Check box in data grid Pin
Daniel Santillanes9-May-06 13:03
professionalDaniel Santillanes9-May-06 13:03 
QuestionASP Split Function Pin
Programm3r9-May-06 2:35
Programm3r9-May-06 2:35 
Hi,

I'm struggling with the split function of ASP. I'm using Dreamweavers ASP, Javascript.
The string looks like this:

+ 'test=1L1S1=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'NTSTART' + , + '15:30' + , + 't' + , + 'Start Time', + 1,1, + 'ASP')L1S2=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'NTEND' + , + '16:30' + , + 't' + , + 'End Time', + 1,2, + 'ASP')L1S3=INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'CHANGEDBY' + , + 'RICHARDB' + , + 'S' + , + 'Changed By', + 1,3, + 'ASP')

As you can see there is sql in the string. The L1S1 stands for LineNo 1 and SeqNo 1 and so on, because I'm building the HTML dynamically. There is a variable called id which runs though a loop and builds the id example. var id = ("L"+x+"S"+y);

I get the string from a hidden field in the HTML called "hide". The hidden field was populated with a javascript function that reads the sql out of a cookie passed on from another page.

Then I use the split function to extract the sql from the string to execute it.
And this is what I have tried so far with no success:

<%
var WordArray= new Array(11);
var THESQLString = new Array(11);
THESQLString = Request.Form("hide");
// with loops in this statement
WordArray[y] = THESQLString[y].split(id);

All I receive is an error saying: Object Expected or WordArray[y] is null or not an object

The en result must look something like this (for each Lines SeqNo):
INSERT INTO SHIFTDEFINITION (SHIFT,DATACOLUMN,DATAVALUE,DATATYPE,FIELDDESCRIPTION,LINENO,SEQNO,COMPANY) VALUES ('ABC' + , + 'CHANGEDBY' + , + 'RICHARDB' + , + 'S' + , + 'Changed By', + 1,3, + 'ASP')

Thanx alot if someone can Help me

Richard a.k.a Programm3r
QuestionProblem in datalist Pin
sandeep_thakur9-May-06 2:29
sandeep_thakur9-May-06 2:29 
AnswerRe: Problem in datalist Pin
KrIstOfK9-May-06 4:03
KrIstOfK9-May-06 4:03 
Questionasp.net to mysql 4.1 with utf-8 encoding insert "?????" Pin
mohammad kazem sattari9-May-06 2:16
mohammad kazem sattari9-May-06 2:16 
QuestionDropDownList Server Control Pin
Eusebiu Marcu9-May-06 2:12
Eusebiu Marcu9-May-06 2:12 
AnswerRe: DropDownList Server Control Pin
KrIstOfK9-May-06 2:20
KrIstOfK9-May-06 2:20 
GeneralRe: DropDownList Server Control Pin
Eusebiu Marcu9-May-06 2:25
Eusebiu Marcu9-May-06 2:25 
QuestionImport/transfer data from excel to Access Pin
Mansurali9-May-06 2:05
Mansurali9-May-06 2:05 
QuestionResponse.Redirect in IFRAME Pin
percyvimal9-May-06 1:50
percyvimal9-May-06 1:50 
AnswerRe: Response.Redirect in IFRAME Pin
Guffa9-May-06 2:23
Guffa9-May-06 2:23 
GeneralRe: Response.Redirect in IFRAME Pin
percyvimal9-May-06 7:59
percyvimal9-May-06 7:59 
QuestionHow to display Live Time in asp.net web file? Pin
Dipan Patel From Gandhinagar9-May-06 1:41
Dipan Patel From Gandhinagar9-May-06 1:41 
AnswerRe: How to display Live Time in asp.net web file? Pin
KrIstOfK9-May-06 2:02
KrIstOfK9-May-06 2:02 
GeneralRe: How to display Live Time in asp.net web file? Pin
Dipan Patel From Gandhinagar9-May-06 2:09
Dipan Patel From Gandhinagar9-May-06 2:09 
GeneralRe: How to display Live Time in asp.net web file? Pin
KrIstOfK9-May-06 2:18
KrIstOfK9-May-06 2:18 
QuestionQUERY: Adding more JS/DOM attributes to DataGrids Pin
dhruba.bandopadhyay8-May-06 23:54
dhruba.bandopadhyay8-May-06 23:54 
QuestionBulk Update into more than one table from a XML using Open XML Pin
NICE TO MEET8-May-06 23:48
NICE TO MEET8-May-06 23:48 
QuestionIncrementing Date..... Pin
Nagraj Naik8-May-06 23:35
Nagraj Naik8-May-06 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.