473,729 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

executing sql code from text field or from multiple varchar(8000) rows in a table

Does anyone know of a way to execute sql code from a dynamically built
text field?

Before beginning, let me state that I know this db architecture is
built solely for frustration and I hope to make it better soon.
Unfortunately, there is never a non-crucial time in which we can do an
upgrade, so we are stuck for now.

Point 1:
There are multiple tables: students, courses, cross-reference
student/courses, teachers, cross-reference teacher/courses, and
others.

Point 2:
Yearly archiving is done by appending a 2 digit year suffix to the
table and rebuilding the table structure for the current year. That
is, each of the tables named above has an archive table for 1999,
2000, 2001, etc. This leads to many tables and a big mess when
unioning them.

Point 3:
A history report is run by building a big query that unions each union
of tables (students, courses, etc) by year. This query has grown too
big for a varchar(8000) field. Actually, it's too big for 2 of them.

Point 4:
I don't want to write code to maintain any more varchar(8000) fields
for this query. It should be much more easily handled with a
temporary table holding each bit of yearly archive data. I have built
this and it works fine. I have also figured out how to pull the rows
from that table, concatenate them, and insert the resulting lump into
a text field in another table.

Point 5:
I haven't figured out how to grab the 5 or so records from that table
and execute them on their own. I figured I could grab them, put them
into a text field that's big enough to hold the whole query and then
select and execute that text field. I've had no luck with that and I
haven't had any luck finding any references that might help me with
this problem. I keep thinking of nesting execute() calls, but that
doesn't work.
I'm open to questions, potential solutions, hints about different way
to approach the problem, anything.

Many thanks in advance,
Rick Caborn
Jul 20 '05 #1
7 6217
Since you didn't specify - I am assuming that the SQL is fairly static from
year to year, just when you change years you add tables.

Use the dynamic logic you have to create a procedure or view to call, which
also gives you performance enhancements.

I am a big fan of captured print and selects statement that get redirected
into a file, and then run that file via OSQL. Sometime you need to use
GAWK, SED, or PERL to clean the text up before executing. I've done this
to create multiple duplicate triggers.

And whatever process breaks the old view/procedure by adding a new table,
then has to create the new procs, since they are the one that extended the
need.

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
Does anyone know of a way to execute sql code from a dynamically built
text field?

Before beginning, let me state that I know this db architecture is
built solely for frustration and I hope to make it better soon.
Unfortunately, there is never a non-crucial time in which we can do an
upgrade, so we are stuck for now.

Point 1:
There are multiple tables: students, courses, cross-reference
student/courses, teachers, cross-reference teacher/courses, and
others.

Point 2:
Yearly archiving is done by appending a 2 digit year suffix to the
table and rebuilding the table structure for the current year. That
is, each of the tables named above has an archive table for 1999,
2000, 2001, etc. This leads to many tables and a big mess when
unioning them.

Point 3:
A history report is run by building a big query that unions each union
of tables (students, courses, etc) by year. This query has grown too
big for a varchar(8000) field. Actually, it's too big for 2 of them.

Point 4:
I don't want to write code to maintain any more varchar(8000) fields
for this query. It should be much more easily handled with a
temporary table holding each bit of yearly archive data. I have built
this and it works fine. I have also figured out how to pull the rows
from that table, concatenate them, and insert the resulting lump into
a text field in another table.

Point 5:
I haven't figured out how to grab the 5 or so records from that table
and execute them on their own. I figured I could grab them, put them
into a text field that's big enough to hold the whole query and then
select and execute that text field. I've had no luck with that and I
haven't had any luck finding any references that might help me with
this problem. I keep thinking of nesting execute() calls, but that
doesn't work.
I'm open to questions, potential solutions, hints about different way
to approach the problem, anything.

Many thanks in advance,
Rick Caborn

Jul 20 '05 #2
Hi David,

Many thanks for your hints. I started to look into xp_cmdshell and
osql, but there are permission problems and of course I can't contact
the person that deals with that and time constraints, etc. I'm hoping
that my approach may still have a hidden escape hatch that will help
me solve this.

If I create a procedure or view, it still needs to pull that big query
out and execute it at some point. That's what I am having trouble
doing.

This may help focus my rambling question a bit:

I have the dynamically built query stored in a field of type "text".
How can I execute that query? It's too big to store in a varchar
variable, so I can't SELECT and EXECUTE() it.

EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns the
big query itself, but I'm thinking I want something like:
EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID = 1''))

Of course, that doesn't work as I would like it to. It simply returns
the big query again. What I'm shooting for is to be able to execute
the string returned from the nested EXECUTE(). Any other ideas?

Regards,
Rick Caborn
"David Rawheiser" <ra*******@hotm ail.com> wrote in message news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
Since you didn't specify - I am assuming that the SQL is fairly static from
year to year, just when you change years you add tables.

Use the dynamic logic you have to create a procedure or view to call, which
also gives you performance enhancements.

I am a big fan of captured print and selects statement that get redirected
into a file, and then run that file via OSQL. Sometime you need to use
GAWK, SED, or PERL to clean the text up before executing. I've done this
to create multiple duplicate triggers.

And whatever process breaks the old view/procedure by adding a new table,
then has to create the new procs, since they are the one that extended the
need.

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
Does anyone know of a way to execute sql code from a dynamically built
text field?

Before beginning, let me state that I know this db architecture is
built solely for frustration and I hope to make it better soon.
Unfortunately, there is never a non-crucial time in which we can do an
upgrade, so we are stuck for now.

Point 1:
There are multiple tables: students, courses, cross-reference
student/courses, teachers, cross-reference teacher/courses, and
others.

Point 2:
Yearly archiving is done by appending a 2 digit year suffix to the
table and rebuilding the table structure for the current year. That
is, each of the tables named above has an archive table for 1999,
2000, 2001, etc. This leads to many tables and a big mess when
unioning them.

Point 3:
A history report is run by building a big query that unions each union
of tables (students, courses, etc) by year. This query has grown too
big for a varchar(8000) field. Actually, it's too big for 2 of them.

Point 4:
I don't want to write code to maintain any more varchar(8000) fields
for this query. It should be much more easily handled with a
temporary table holding each bit of yearly archive data. I have built
this and it works fine. I have also figured out how to pull the rows
from that table, concatenate them, and insert the resulting lump into
a text field in another table.

Point 5:
I haven't figured out how to grab the 5 or so records from that table
and execute them on their own. I figured I could grab them, put them
into a text field that's big enough to hold the whole query and then
select and execute that text field. I've had no luck with that and I
haven't had any luck finding any references that might help me with
this problem. I keep thinking of nesting execute() calls, but that
doesn't work.
I'm open to questions, potential solutions, hints about different way
to approach the problem, anything.

Many thanks in advance,
Rick Caborn

Jul 20 '05 #3
Text columns are a bit of a PITA in Transact-SQL. You can accomplish the
task using SUBSTRING like the untested example below.

DECLARE
@QueryPart1 varchar(8000),
@QueryPart2 varchar(8000),
@QueryPart3 varchar(8000),
@QueryPart4 varchar(8000),
@QueryLength int

SELECT
@QueryLength=DA TALENGTH(t_Quer y),
@QueryPart1 = SUBSTRING(t_Que ry, 1, 8000)
tblQueries WHERE i_QID = 1

IF @QueryLength > 8000
SELECT
@QueryPart2 = SUBSTRING(t_Que ry, 8001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart2 = ''

IF @QueryLength > 16001
SELECT
@QueryPart3 = SUBSTRING(t_Que ry, 16001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart3 = ''

IF @QueryLength > 24001
SELECT
@QueryPart4 = SUBSTRING(t_Que ry, 24001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart4 = ''

EXEC(@QueryPart 1 + @QueryPart2 + @QueryPart3 + @QueryPart4)

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
Hi David,

Many thanks for your hints. I started to look into xp_cmdshell and
osql, but there are permission problems and of course I can't contact
the person that deals with that and time constraints, etc. I'm hoping
that my approach may still have a hidden escape hatch that will help
me solve this.

If I create a procedure or view, it still needs to pull that big query
out and execute it at some point. That's what I am having trouble
doing.

This may help focus my rambling question a bit:

I have the dynamically built query stored in a field of type "text".
How can I execute that query? It's too big to store in a varchar
variable, so I can't SELECT and EXECUTE() it.

EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns the
big query itself, but I'm thinking I want something like:
EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID = 1''))

Of course, that doesn't work as I would like it to. It simply returns
the big query again. What I'm shooting for is to be able to execute
the string returned from the nested EXECUTE(). Any other ideas?

Regards,
Rick Caborn
"David Rawheiser" <ra*******@hotm ail.com> wrote in message
news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
Since you didn't specify - I am assuming that the SQL is fairly static
from
year to year, just when you change years you add tables.

Use the dynamic logic you have to create a procedure or view to call,
which
also gives you performance enhancements.

I am a big fan of captured print and selects statement that get
redirected
into a file, and then run that file via OSQL. Sometime you need to use
GAWK, SED, or PERL to clean the text up before executing. I've done
this
to create multiple duplicate triggers.

And whatever process breaks the old view/procedure by adding a new table,
then has to create the new procs, since they are the one that extended
the
need.

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
> Does anyone know of a way to execute sql code from a dynamically built
> text field?
>
> Before beginning, let me state that I know this db architecture is
> built solely for frustration and I hope to make it better soon.
> Unfortunately, there is never a non-crucial time in which we can do an
> upgrade, so we are stuck for now.
>
> Point 1:
> There are multiple tables: students, courses, cross-reference
> student/courses, teachers, cross-reference teacher/courses, and
> others.
>
> Point 2:
> Yearly archiving is done by appending a 2 digit year suffix to the
> table and rebuilding the table structure for the current year. That
> is, each of the tables named above has an archive table for 1999,
> 2000, 2001, etc. This leads to many tables and a big mess when
> unioning them.
>
> Point 3:
> A history report is run by building a big query that unions each union
> of tables (students, courses, etc) by year. This query has grown too
> big for a varchar(8000) field. Actually, it's too big for 2 of them.
>
> Point 4:
> I don't want to write code to maintain any more varchar(8000) fields
> for this query. It should be much more easily handled with a
> temporary table holding each bit of yearly archive data. I have built
> this and it works fine. I have also figured out how to pull the rows
> from that table, concatenate them, and insert the resulting lump into
> a text field in another table.
>
> Point 5:
> I haven't figured out how to grab the 5 or so records from that table
> and execute them on their own. I figured I could grab them, put them
> into a text field that's big enough to hold the whole query and then
> select and execute that text field. I've had no luck with that and I
> haven't had any luck finding any references that might help me with
> this problem. I keep thinking of nesting execute() calls, but that
> doesn't work.
>
>
> I'm open to questions, potential solutions, hints about different way
> to approach the problem, anything.
>
> Many thanks in advance,
> Rick Caborn

Jul 20 '05 #4

Hi Dan,

Thanks for your detailed response and sample code. I neglected to
mention that I have already tried this approach and for some reason,
DATALENGTH() is reporting a length of 8000 for the t_Query field (TEXT
type). When I run an asp page that selects that field and prints it
out, I get all that I expect (10866 characters).

I have tried setting TEXTSIZE and that doesn't seem to affect the result
in Query Analyzer.

When I try reading past the 8000 point using SUBSTRING(), I get the
following result:

Server: Msg 212, Level 16, State 1, Line 32
Expression result length exceeds the maximum. 8000 max, 9000 found.

When I try to use READTEXT() to get the entire query, I get the
following result:

Server: Msg 7124, Level 16, State 1, Line 55
The offset and length specified in the READTEXT statement is greater
than the actual data length of 8000.
My asp page returning the full size of the text field shows me that the
actual data length is over 8000. Why would SQL Server think that it's
only 8000? I have tried this with "text in row" both enabled and
disabled.

Any other ideas, pointers, references, etc?
Regards,
Rick Caborn
Dan Guzman wrote:

Text columns are a bit of a PITA in Transact-SQL. You can accomplish the
task using SUBSTRING like the untested example below.

DECLARE
@QueryPart1 varchar(8000),
@QueryPart2 varchar(8000),
@QueryPart3 varchar(8000),
@QueryPart4 varchar(8000),
@QueryLength int

SELECT
@QueryLength=DA TALENGTH(t_Quer y),
@QueryPart1 = SUBSTRING(t_Que ry, 1, 8000)
tblQueries WHERE i_QID = 1

IF @QueryLength > 8000
SELECT
@QueryPart2 = SUBSTRING(t_Que ry, 8001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart2 = ''

IF @QueryLength > 16001
SELECT
@QueryPart3 = SUBSTRING(t_Que ry, 16001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart3 = ''

IF @QueryLength > 24001
SELECT
@QueryPart4 = SUBSTRING(t_Que ry, 24001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart4 = ''

EXEC(@QueryPart 1 + @QueryPart2 + @QueryPart3 + @QueryPart4)

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
Hi David,

Many thanks for your hints. I started to look into xp_cmdshell and
osql, but there are permission problems and of course I can't contact
the person that deals with that and time constraints, etc. I'm hoping
that my approach may still have a hidden escape hatch that will help
me solve this.

If I create a procedure or view, it still needs to pull that big query
out and execute it at some point. That's what I am having trouble
doing.

This may help focus my rambling question a bit:

I have the dynamically built query stored in a field of type "text".
How can I execute that query? It's too big to store in a varchar
variable, so I can't SELECT and EXECUTE() it.

EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns the
big query itself, but I'm thinking I want something like:
EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID = 1''))

Of course, that doesn't work as I would like it to. It simply returns
the big query again. What I'm shooting for is to be able to execute
the string returned from the nested EXECUTE(). Any other ideas?

Regards,
Rick Caborn
"David Rawheiser" <ra*******@hotm ail.com> wrote in message
news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
Since you didn't specify - I am assuming that the SQL is fairly static
from
year to year, just when you change years you add tables.

Use the dynamic logic you have to create a procedure or view to call,
which
also gives you performance enhancements.

I am a big fan of captured print and selects statement that get
redirected
into a file, and then run that file via OSQL. Sometime you need to use
GAWK, SED, or PERL to clean the text up before executing. I've done
this
to create multiple duplicate triggers.

And whatever process breaks the old view/procedure by adding a new table,
then has to create the new procs, since they are the one that extended
the
need.

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
> Does anyone know of a way to execute sql code from a dynamically built
> text field?
>
> Before beginning, let me state that I know this db architecture is
> built solely for frustration and I hope to make it better soon.
> Unfortunately, there is never a non-crucial time in which we can do an
> upgrade, so we are stuck for now.
>
> Point 1:
> There are multiple tables: students, courses, cross-reference
> student/courses, teachers, cross-reference teacher/courses, and
> others.
>
> Point 2:
> Yearly archiving is done by appending a 2 digit year suffix to the
> table and rebuilding the table structure for the current year. That
> is, each of the tables named above has an archive table for 1999,
> 2000, 2001, etc. This leads to many tables and a big mess when
> unioning them.
>
> Point 3:
> A history report is run by building a big query that unions each union
> of tables (students, courses, etc) by year. This query has grown too
> big for a varchar(8000) field. Actually, it's too big for 2 of them.
>
> Point 4:
> I don't want to write code to maintain any more varchar(8000) fields
> for this query. It should be much more easily handled with a
> temporary table holding each bit of yearly archive data. I have built
> this and it works fine. I have also figured out how to pull the rows
> from that table, concatenate them, and insert the resulting lump into
> a text field in another table.
>
> Point 5:
> I haven't figured out how to grab the 5 or so records from that table
> and execute them on their own. I figured I could grab them, put them
> into a text field that's big enough to hold the whole query and then
> select and execute that text field. I've had no luck with that and I
> haven't had any luck finding any references that might help me with
> this problem. I keep thinking of nesting execute() calls, but that
> doesn't work.
>
>
> I'm open to questions, potential solutions, hints about different way
> to approach the problem, anything.
>
> Many thanks in advance,
> Rick Caborn

Jul 20 '05 #5
> I neglected to
mention that I have already tried this approach and for some reason,
DATALENGTH() is reporting a length of 8000 for the t_Query field
Something is not right then. DATALENGTH should report the actual length of
the text data in bytes. The TEXTSIZE setting is not relevant. The
following script returns the expected length of 24000 on my test server. Do
you get the same results on your machine with this script? Does this SELECT
return a length of 8000 against your actual table?

USE tempdb
CREATE TABLE tblQueries
(
i_QID int NOT NULL
CONSTRAINT PK_tblQueries PRIMARY KEY,
t_Query text NOT NULL,
)

DECLARE @TextPtr varbinary(16)
DECLARE @TestData varchar(8000)
SET @TestData = REPLICATE('x', 8000)
INSERT INTO tblQueries VALUES(1, @TestData)
SELECT @TextPtr = TEXTPTR(t_Query ) FROM tblQueries
UPDATETEXT tblQueries.t_Qu ery @TextPtr 8000 0 @TestData
UPDATETEXT tblQueries.t_Qu ery @TextPtr 16000 0 @TestData

SELECT DATALENGTH(t_Qu ery)
FROM tblQueries
WHERE i_QID = 1

DROP TABLE tblQueries
GO

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:41******** *******@yahoo.c a...
Hi Dan,

Thanks for your detailed response and sample code. I neglected to
mention that I have already tried this approach and for some reason,
DATALENGTH() is reporting a length of 8000 for the t_Query field (TEXT
type). When I run an asp page that selects that field and prints it
out, I get all that I expect (10866 characters).

I have tried setting TEXTSIZE and that doesn't seem to affect the result
in Query Analyzer.

When I try reading past the 8000 point using SUBSTRING(), I get the
following result:

Server: Msg 212, Level 16, State 1, Line 32
Expression result length exceeds the maximum. 8000 max, 9000 found.

When I try to use READTEXT() to get the entire query, I get the
following result:

Server: Msg 7124, Level 16, State 1, Line 55
The offset and length specified in the READTEXT statement is greater
than the actual data length of 8000.
My asp page returning the full size of the text field shows me that the
actual data length is over 8000. Why would SQL Server think that it's
only 8000? I have tried this with "text in row" both enabled and
disabled.

Any other ideas, pointers, references, etc?
Regards,
Rick Caborn
Dan Guzman wrote:

Text columns are a bit of a PITA in Transact-SQL. You can accomplish the
task using SUBSTRING like the untested example below.

DECLARE
@QueryPart1 varchar(8000),
@QueryPart2 varchar(8000),
@QueryPart3 varchar(8000),
@QueryPart4 varchar(8000),
@QueryLength int

SELECT
@QueryLength=DA TALENGTH(t_Quer y),
@QueryPart1 = SUBSTRING(t_Que ry, 1, 8000)
tblQueries WHERE i_QID = 1

IF @QueryLength > 8000
SELECT
@QueryPart2 = SUBSTRING(t_Que ry, 8001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart2 = ''

IF @QueryLength > 16001
SELECT
@QueryPart3 = SUBSTRING(t_Que ry, 16001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart3 = ''

IF @QueryLength > 24001
SELECT
@QueryPart4 = SUBSTRING(t_Que ry, 24001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart4 = ''

EXEC(@QueryPart 1 + @QueryPart2 + @QueryPart3 + @QueryPart4)

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
> Hi David,
>
> Many thanks for your hints. I started to look into xp_cmdshell and
> osql, but there are permission problems and of course I can't contact
> the person that deals with that and time constraints, etc. I'm hoping
> that my approach may still have a hidden escape hatch that will help
> me solve this.
>
> If I create a procedure or view, it still needs to pull that big query
> out and execute it at some point. That's what I am having trouble
> doing.
>
> This may help focus my rambling question a bit:
>
> I have the dynamically built query stored in a field of type "text".
> How can I execute that query? It's too big to store in a varchar
> variable, so I can't SELECT and EXECUTE() it.
>
> EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns the
> big query itself, but I'm thinking I want something like:
> EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID = 1''))
>
> Of course, that doesn't work as I would like it to. It simply returns
> the big query again. What I'm shooting for is to be able to execute
> the string returned from the nested EXECUTE(). Any other ideas?
>
> Regards,
> Rick Caborn
>
>
> "David Rawheiser" <ra*******@hotm ail.com> wrote in message
> news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
>> Since you didn't specify - I am assuming that the SQL is fairly static
>> from
>> year to year, just when you change years you add tables.
>>
>> Use the dynamic logic you have to create a procedure or view to call,
>> which
>> also gives you performance enhancements.
>>
>> I am a big fan of captured print and selects statement that get
>> redirected
>> into a file, and then run that file via OSQL. Sometime you need to
>> use
>> GAWK, SED, or PERL to clean the text up before executing. I've done
>> this
>> to create multiple duplicate triggers.
>>
>> And whatever process breaks the old view/procedure by adding a new
>> table,
>> then has to create the new procs, since they are the one that extended
>> the
>> need.
>>
>> "Rick Caborn" <ri********@yah oo.ca> wrote in message
>> news:db******** *************** ***@posting.goo gle.com...
>> > Does anyone know of a way to execute sql code from a dynamically
>> > built
>> > text field?
>> >
>> > Before beginning, let me state that I know this db architecture is
>> > built solely for frustration and I hope to make it better soon.
>> > Unfortunately, there is never a non-crucial time in which we can do
>> > an
>> > upgrade, so we are stuck for now.
>> >
>> > Point 1:
>> > There are multiple tables: students, courses, cross-reference
>> > student/courses, teachers, cross-reference teacher/courses, and
>> > others.
>> >
>> > Point 2:
>> > Yearly archiving is done by appending a 2 digit year suffix to the
>> > table and rebuilding the table structure for the current year. That
>> > is, each of the tables named above has an archive table for 1999,
>> > 2000, 2001, etc. This leads to many tables and a big mess when
>> > unioning them.
>> >
>> > Point 3:
>> > A history report is run by building a big query that unions each
>> > union
>> > of tables (students, courses, etc) by year. This query has grown
>> > too
>> > big for a varchar(8000) field. Actually, it's too big for 2 of
>> > them.
>> >
>> > Point 4:
>> > I don't want to write code to maintain any more varchar(8000) fields
>> > for this query. It should be much more easily handled with a
>> > temporary table holding each bit of yearly archive data. I have
>> > built
>> > this and it works fine. I have also figured out how to pull the
>> > rows
>> > from that table, concatenate them, and insert the resulting lump
>> > into
>> > a text field in another table.
>> >
>> > Point 5:
>> > I haven't figured out how to grab the 5 or so records from that
>> > table
>> > and execute them on their own. I figured I could grab them, put
>> > them
>> > into a text field that's big enough to hold the whole query and then
>> > select and execute that text field. I've had no luck with that and
>> > I
>> > haven't had any luck finding any references that might help me with
>> > this problem. I keep thinking of nesting execute() calls, but that
>> > doesn't work.
>> >
>> >
>> > I'm open to questions, potential solutions, hints about different
>> > way
>> > to approach the problem, anything.
>> >
>> > Many thanks in advance,
>> > Rick Caborn

Jul 20 '05 #6

Magnificent! It works like a charm.

My original approach was to build the big query from smaller pieces
stored in a different table. I inserted the pieces of the big query in
one go via an EXECUTE() call wrapped around the 6 or 7 select queries
into the subquery table. Inserting the big query that way seems to be
the problem, although I don't know why. Even though the entire query is
there to be read in its entirety from an asp page, trying SUBSTRING or
READTEXT past the 8000 byte position in a stored procedure or via Query
Analyzer consistently failed.

Now, instead of putting the pieces of the big query into a "query chunk"
table and selecting from that to insert the whole big query, I'm
inserting the first part directly into tblQueries and using UPDATETEXT
to append to it. It works exactly as expected.

Thanks for your input - you helped me see that I could remove the
unnecessary middle step and make the query work. I hope that I can be
as helpful to someone someday - many thanks!

Best regards,
Rick Caborn
Dan Guzman wrote:
I neglected to
mention that I have already tried this approach and for some reason,
DATALENGTH() is reporting a length of 8000 for the t_Query field


Something is not right then. DATALENGTH should report the actual length of
the text data in bytes. The TEXTSIZE setting is not relevant. The
following script returns the expected length of 24000 on my test server. Do
you get the same results on your machine with this script? Does this SELECT
return a length of 8000 against your actual table?

USE tempdb
CREATE TABLE tblQueries
(
i_QID int NOT NULL
CONSTRAINT PK_tblQueries PRIMARY KEY,
t_Query text NOT NULL,
)

DECLARE @TextPtr varbinary(16)
DECLARE @TestData varchar(8000)
SET @TestData = REPLICATE('x', 8000)
INSERT INTO tblQueries VALUES(1, @TestData)
SELECT @TextPtr = TEXTPTR(t_Query ) FROM tblQueries
UPDATETEXT tblQueries.t_Qu ery @TextPtr 8000 0 @TestData
UPDATETEXT tblQueries.t_Qu ery @TextPtr 16000 0 @TestData

SELECT DATALENGTH(t_Qu ery)
FROM tblQueries
WHERE i_QID = 1

DROP TABLE tblQueries
GO

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:41******** *******@yahoo.c a...

Hi Dan,

Thanks for your detailed response and sample code. I neglected to
mention that I have already tried this approach and for some reason,
DATALENGTH() is reporting a length of 8000 for the t_Query field (TEXT
type). When I run an asp page that selects that field and prints it
out, I get all that I expect (10866 characters).

I have tried setting TEXTSIZE and that doesn't seem to affect the result
in Query Analyzer.

When I try reading past the 8000 point using SUBSTRING(), I get the
following result:

Server: Msg 212, Level 16, State 1, Line 32
Expression result length exceeds the maximum. 8000 max, 9000 found.

When I try to use READTEXT() to get the entire query, I get the
following result:

Server: Msg 7124, Level 16, State 1, Line 55
The offset and length specified in the READTEXT statement is greater
than the actual data length of 8000.
My asp page returning the full size of the text field shows me that the
actual data length is over 8000. Why would SQL Server think that it's
only 8000? I have tried this with "text in row" both enabled and
disabled.

Any other ideas, pointers, references, etc?
Regards,
Rick Caborn
Dan Guzman wrote:

Text columns are a bit of a PITA in Transact-SQL. You can accomplish the
task using SUBSTRING like the untested example below.

DECLARE
@QueryPart1 varchar(8000),
@QueryPart2 varchar(8000),
@QueryPart3 varchar(8000),
@QueryPart4 varchar(8000),
@QueryLength int

SELECT
@QueryLength=DA TALENGTH(t_Quer y),
@QueryPart1 = SUBSTRING(t_Que ry, 1, 8000)
tblQueries WHERE i_QID = 1

IF @QueryLength > 8000
SELECT
@QueryPart2 = SUBSTRING(t_Que ry, 8001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart2 = ''

IF @QueryLength > 16001
SELECT
@QueryPart3 = SUBSTRING(t_Que ry, 16001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart3 = ''

IF @QueryLength > 24001
SELECT
@QueryPart4 = SUBSTRING(t_Que ry, 24001, 8000)
FROM tblQueries WHERE i_QID = 1
ELSE
SET @QueryPart4 = ''

EXEC(@QueryPart 1 + @QueryPart2 + @QueryPart3 + @QueryPart4)

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:db******** *************** ***@posting.goo gle.com...
> Hi David,
>
> Many thanks for your hints. I started to look into xp_cmdshell and
> osql, but there are permission problems and of course I can't contact
> the person that deals with that and time constraints, etc. I'm hoping
> that my approach may still have a hidden escape hatch that will help
> me solve this.
>
> If I create a procedure or view, it still needs to pull that big query
> out and execute it at some point. That's what I am having trouble
> doing.
>
> This may help focus my rambling question a bit:
>
> I have the dynamically built query stored in a field of type "text".
> How can I execute that query? It's too big to store in a varchar
> variable, so I can't SELECT and EXECUTE() it.
>
> EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns the
> big query itself, but I'm thinking I want something like:
> EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID = 1''))
>
> Of course, that doesn't work as I would like it to. It simply returns
> the big query again. What I'm shooting for is to be able to execute
> the string returned from the nested EXECUTE(). Any other ideas?
>
> Regards,
> Rick Caborn
>
>
> "David Rawheiser" <ra*******@hotm ail.com> wrote in message
> news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
>> Since you didn't specify - I am assuming that the SQL is fairly static
>> from
>> year to year, just when you change years you add tables.
>>
>> Use the dynamic logic you have to create a procedure or view to call,
>> which
>> also gives you performance enhancements.
>>
>> I am a big fan of captured print and selects statement that get
>> redirected
>> into a file, and then run that file via OSQL. Sometime you need to
>> use
>> GAWK, SED, or PERL to clean the text up before executing. I've done
>> this
>> to create multiple duplicate triggers.
>>
>> And whatever process breaks the old view/procedure by adding a new
>> table,
>> then has to create the new procs, since they are the one that extended
>> the
>> need.
>>
>> "Rick Caborn" <ri********@yah oo.ca> wrote in message
>> news:db******** *************** ***@posting.goo gle.com...
>> > Does anyone know of a way to execute sql code from a dynamically
>> > built
>> > text field?
>> >
>> > Before beginning, let me state that I know this db architecture is
>> > built solely for frustration and I hope to make it better soon.
>> > Unfortunately, there is never a non-crucial time in which we can do
>> > an
>> > upgrade, so we are stuck for now.
>> >
>> > Point 1:
>> > There are multiple tables: students, courses, cross-reference
>> > student/courses, teachers, cross-reference teacher/courses, and
>> > others.
>> >
>> > Point 2:
>> > Yearly archiving is done by appending a 2 digit year suffix to the
>> > table and rebuilding the table structure for the current year. That
>> > is, each of the tables named above has an archive table for 1999,
>> > 2000, 2001, etc. This leads to many tables and a big mess when
>> > unioning them.
>> >
>> > Point 3:
>> > A history report is run by building a big query that unions each
>> > union
>> > of tables (students, courses, etc) by year. This query has grown
>> > too
>> > big for a varchar(8000) field. Actually, it's too big for 2 of
>> > them.
>> >
>> > Point 4:
>> > I don't want to write code to maintain any more varchar(8000) fields
>> > for this query. It should be much more easily handled with a
>> > temporary table holding each bit of yearly archive data. I have
>> > built
>> > this and it works fine. I have also figured out how to pull the
>> > rows
>> > from that table, concatenate them, and insert the resulting lump
>> > into
>> > a text field in another table.
>> >
>> > Point 5:
>> > I haven't figured out how to grab the 5 or so records from that
>> > table
>> > and execute them on their own. I figured I could grab them, put
>> > them
>> > into a text field that's big enough to hold the whole query and then
>> > select and execute that text field. I've had no luck with that and
>> > I
>> > haven't had any luck finding any references that might help me with
>> > this problem. I keep thinking of nesting execute() calls, but that
>> > doesn't work.
>> >
>> >
>> > I'm open to questions, potential solutions, hints about different
>> > way
>> > to approach the problem, anything.
>> >
>> > Many thanks in advance,
>> > Rick Caborn

Jul 20 '05 #7
I'm glad I was able to help.

--
Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:41******** *******@yahoo.c a...

Magnificent! It works like a charm.

My original approach was to build the big query from smaller pieces
stored in a different table. I inserted the pieces of the big query in
one go via an EXECUTE() call wrapped around the 6 or 7 select queries
into the subquery table. Inserting the big query that way seems to be
the problem, although I don't know why. Even though the entire query is
there to be read in its entirety from an asp page, trying SUBSTRING or
READTEXT past the 8000 byte position in a stored procedure or via Query
Analyzer consistently failed.

Now, instead of putting the pieces of the big query into a "query chunk"
table and selecting from that to insert the whole big query, I'm
inserting the first part directly into tblQueries and using UPDATETEXT
to append to it. It works exactly as expected.

Thanks for your input - you helped me see that I could remove the
unnecessary middle step and make the query work. I hope that I can be
as helpful to someone someday - many thanks!

Best regards,
Rick Caborn
Dan Guzman wrote:
> I neglected to
> mention that I have already tried this approach and for some reason,
> DATALENGTH() is reporting a length of 8000 for the t_Query field


Something is not right then. DATALENGTH should report the actual length
of
the text data in bytes. The TEXTSIZE setting is not relevant. The
following script returns the expected length of 24000 on my test server.
Do
you get the same results on your machine with this script? Does this
SELECT
return a length of 8000 against your actual table?

USE tempdb
CREATE TABLE tblQueries
(
i_QID int NOT NULL
CONSTRAINT PK_tblQueries PRIMARY KEY,
t_Query text NOT NULL,
)

DECLARE @TextPtr varbinary(16)
DECLARE @TestData varchar(8000)
SET @TestData = REPLICATE('x', 8000)
INSERT INTO tblQueries VALUES(1, @TestData)
SELECT @TextPtr = TEXTPTR(t_Query ) FROM tblQueries
UPDATETEXT tblQueries.t_Qu ery @TextPtr 8000 0 @TestData
UPDATETEXT tblQueries.t_Qu ery @TextPtr 16000 0 @TestData

SELECT DATALENGTH(t_Qu ery)
FROM tblQueries
WHERE i_QID = 1

DROP TABLE tblQueries
GO

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Rick Caborn" <ri********@yah oo.ca> wrote in message
news:41******** *******@yahoo.c a...
>
> Hi Dan,
>
> Thanks for your detailed response and sample code. I neglected to
> mention that I have already tried this approach and for some reason,
> DATALENGTH() is reporting a length of 8000 for the t_Query field (TEXT
> type). When I run an asp page that selects that field and prints it
> out, I get all that I expect (10866 characters).
>
> I have tried setting TEXTSIZE and that doesn't seem to affect the
> result
> in Query Analyzer.
>
> When I try reading past the 8000 point using SUBSTRING(), I get the
> following result:
>
> Server: Msg 212, Level 16, State 1, Line 32
> Expression result length exceeds the maximum. 8000 max, 9000 found.
>
>
>
> When I try to use READTEXT() to get the entire query, I get the
> following result:
>
> Server: Msg 7124, Level 16, State 1, Line 55
> The offset and length specified in the READTEXT statement is greater
> than the actual data length of 8000.
>
>
> My asp page returning the full size of the text field shows me that the
> actual data length is over 8000. Why would SQL Server think that it's
> only 8000? I have tried this with "text in row" both enabled and
> disabled.
>
> Any other ideas, pointers, references, etc?
>
>
> Regards,
> Rick Caborn
>
>
> Dan Guzman wrote:
>>
>> Text columns are a bit of a PITA in Transact-SQL. You can accomplish
>> the
>> task using SUBSTRING like the untested example below.
>>
>> DECLARE
>> @QueryPart1 varchar(8000),
>> @QueryPart2 varchar(8000),
>> @QueryPart3 varchar(8000),
>> @QueryPart4 varchar(8000),
>> @QueryLength int
>>
>> SELECT
>> @QueryLength=DA TALENGTH(t_Quer y),
>> @QueryPart1 = SUBSTRING(t_Que ry, 1, 8000)
>> tblQueries WHERE i_QID = 1
>>
>> IF @QueryLength > 8000
>> SELECT
>> @QueryPart2 = SUBSTRING(t_Que ry, 8001, 8000)
>> FROM tblQueries WHERE i_QID = 1
>> ELSE
>> SET @QueryPart2 = ''
>>
>> IF @QueryLength > 16001
>> SELECT
>> @QueryPart3 = SUBSTRING(t_Que ry, 16001, 8000)
>> FROM tblQueries WHERE i_QID = 1
>> ELSE
>> SET @QueryPart3 = ''
>>
>> IF @QueryLength > 24001
>> SELECT
>> @QueryPart4 = SUBSTRING(t_Que ry, 24001, 8000)
>> FROM tblQueries WHERE i_QID = 1
>> ELSE
>> SET @QueryPart4 = ''
>>
>> EXEC(@QueryPart 1 + @QueryPart2 + @QueryPart3 + @QueryPart4)
>>
>> --
>> Hope this helps.
>>
>> Dan Guzman
>> SQL Server MVP
>>
>> "Rick Caborn" <ri********@yah oo.ca> wrote in message
>> news:db******** *************** ***@posting.goo gle.com...
>> > Hi David,
>> >
>> > Many thanks for your hints. I started to look into xp_cmdshell and
>> > osql, but there are permission problems and of course I can't
>> > contact
>> > the person that deals with that and time constraints, etc. I'm
>> > hoping
>> > that my approach may still have a hidden escape hatch that will help
>> > me solve this.
>> >
>> > If I create a procedure or view, it still needs to pull that big
>> > query
>> > out and execute it at some point. That's what I am having trouble
>> > doing.
>> >
>> > This may help focus my rambling question a bit:
>> >
>> > I have the dynamically built query stored in a field of type "text".
>> > How can I execute that query? It's too big to store in a varchar
>> > variable, so I can't SELECT and EXECUTE() it.
>> >
>> > EXECUTE('SELECT t_Query FROM tblQueries WHERE i_QID = 1') returns
>> > the
>> > big query itself, but I'm thinking I want something like:
>> > EXECUTE('EXECUT E(''SELECT t_Query FROM tblQueries WHERE i_QID =
>> > 1''))
>> >
>> > Of course, that doesn't work as I would like it to. It simply
>> > returns
>> > the big query again. What I'm shooting for is to be able to execute
>> > the string returned from the nested EXECUTE(). Any other ideas?
>> >
>> > Regards,
>> > Rick Caborn
>> >
>> >
>> > "David Rawheiser" <ra*******@hotm ail.com> wrote in message
>> > news:<Tm******* **************@ bgtnsc04-news.ops.worldn et.att.net>...
>> >> Since you didn't specify - I am assuming that the SQL is fairly
>> >> static
>> >> from
>> >> year to year, just when you change years you add tables.
>> >>
>> >> Use the dynamic logic you have to create a procedure or view to
>> >> call,
>> >> which
>> >> also gives you performance enhancements.
>> >>
>> >> I am a big fan of captured print and selects statement that get
>> >> redirected
>> >> into a file, and then run that file via OSQL. Sometime you need to
>> >> use
>> >> GAWK, SED, or PERL to clean the text up before executing. I've
>> >> done
>> >> this
>> >> to create multiple duplicate triggers.
>> >>
>> >> And whatever process breaks the old view/procedure by adding a new
>> >> table,
>> >> then has to create the new procs, since they are the one that
>> >> extended
>> >> the
>> >> need.
>> >>
>> >> "Rick Caborn" <ri********@yah oo.ca> wrote in message
>> >> news:db******** *************** ***@posting.goo gle.com...
>> >> > Does anyone know of a way to execute sql code from a dynamically
>> >> > built
>> >> > text field?
>> >> >
>> >> > Before beginning, let me state that I know this db architecture
>> >> > is
>> >> > built solely for frustration and I hope to make it better soon.
>> >> > Unfortunately, there is never a non-crucial time in which we can
>> >> > do
>> >> > an
>> >> > upgrade, so we are stuck for now.
>> >> >
>> >> > Point 1:
>> >> > There are multiple tables: students, courses, cross-reference
>> >> > student/courses, teachers, cross-reference teacher/courses, and
>> >> > others.
>> >> >
>> >> > Point 2:
>> >> > Yearly archiving is done by appending a 2 digit year suffix to
>> >> > the
>> >> > table and rebuilding the table structure for the current year.
>> >> > That
>> >> > is, each of the tables named above has an archive table for 1999,
>> >> > 2000, 2001, etc. This leads to many tables and a big mess when
>> >> > unioning them.
>> >> >
>> >> > Point 3:
>> >> > A history report is run by building a big query that unions each
>> >> > union
>> >> > of tables (students, courses, etc) by year. This query has grown
>> >> > too
>> >> > big for a varchar(8000) field. Actually, it's too big for 2 of
>> >> > them.
>> >> >
>> >> > Point 4:
>> >> > I don't want to write code to maintain any more varchar(8000)
>> >> > fields
>> >> > for this query. It should be much more easily handled with a
>> >> > temporary table holding each bit of yearly archive data. I have
>> >> > built
>> >> > this and it works fine. I have also figured out how to pull the
>> >> > rows
>> >> > from that table, concatenate them, and insert the resulting lump
>> >> > into
>> >> > a text field in another table.
>> >> >
>> >> > Point 5:
>> >> > I haven't figured out how to grab the 5 or so records from that
>> >> > table
>> >> > and execute them on their own. I figured I could grab them, put
>> >> > them
>> >> > into a text field that's big enough to hold the whole query and
>> >> > then
>> >> > select and execute that text field. I've had no luck with that
>> >> > and
>> >> > I
>> >> > haven't had any luck finding any references that might help me
>> >> > with
>> >> > this problem. I keep thinking of nesting execute() calls, but
>> >> > that
>> >> > doesn't work.
>> >> >
>> >> >
>> >> > I'm open to questions, potential solutions, hints about different
>> >> > way
>> >> > to approach the problem, anything.
>> >> >
>> >> > Many thanks in advance,
>> >> > Rick Caborn

Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
33311
by: RotterdamStudents | last post by:
Hello there, i have a strange problem. I can't get php to insert multiple rows at once in a MySQL database. I use the $sql = "INSERT INTO database (a,b,c,d,e) VALUES ('$a', '$b' ,'$c', '$d', '$e')"; I want to insert 5 rows at a time in the database, but it only inserts every 5th record. For example: 1. AA
1
9728
by: Valerie | last post by:
Hi everyone, I really appreciate if anyone could help me with this tricky problem that I'm having. I'm looking for a sample script to combine data in multiple rows into one row. I'm using sqlserver. This is how data is stored in the table. ID Color 111 Blue 111 Yellow
4
5136
by: fip | last post by:
Hi, On DB2 7.1.2 on MVS OS 390, when I tried to do an insert with multiple row contents in the values clause: insert into table11 values('aaaa', 'fa'), ('bbbb', 'fb') I got the error: DB21034E The command was processed as an SQL statement because it
1
2241
by: Jay | last post by:
Hi All, My users are complaining about the page refreshing when they are selecting multiple rows in a datagrid. Has anyone tried to manage this using javascript? I tried smartnavigation but that caused me other problems. Any ideas? Thanks, Jay
1
3353
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been able to find any examples which demonstrate how to do this. My Code:
0
1894
by: craftit | last post by:
hi everyone, i need to insert multiple rows in a single table using Oledbdataadapter for access database all in one trip in my winform(VB.Net). i've tried the best i can.Can anyone please help me out . Thanks
2
3260
by: kevinjbowman | last post by:
I am by no means a SQl Jedi as will be apparent by my question, but I can usually figure out a select statement on my own. I have one today though that really has me stumped. I am working in MySQlL 5. In My first select statement I get all my records from Table B SELECT `table_A`.`ITEM`, `table_A`.`DECSCRIPTION`, `table_A`.`UM`, `table_A`.`PHASE`,
1
3491
by: arockiasamy | last post by:
hi, How to select multiple rows in a table using java script? and that selected rows must be deleted? i have done for single selection. how it can be for multiple? come on help me.. i dont want to use list? . only table rows created by html. kindly help with regards sam
3
3102
by: =?Utf-8?B?S2F5xLFoYW4=?= | last post by:
In my project,i added datagridview to my form , i transfered my table to datagridview and added multiple rows and when i called dataadapther.update ,,result is ok. But when i tried it for the delete operations,i got the error like "set primary key in your table" ,,i want delete multiple rows from Datatable which doesnt contain primary key
0
8927
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8764
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9156
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3242
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2694
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.