Sunday, March 25, 2012

asp.net

When I attempt to install sql reporting services enterprise, i receive the
following:
"System Check results--asp.net is not installed or is not registered with
your web server".
I review services and iisadmin is there and running as is also asp.net state
services which I had started to run automatically. Microsoft .net framework
1.1 is confirmed installed in the add/remove programs.
Anyone come across this before?
thanksDid you by any chance remove the default website? RS needs the default
website to be able to install.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> When I attempt to install sql reporting services enterprise, i receive the
> following:
> "System Check results--asp.net is not installed or is not registered with
> your web server".
> I review services and iisadmin is there and running as is also asp.net
state
> services which I had started to run automatically. Microsoft .net
framework
> 1.1 is confirmed installed in the add/remove programs.
> Anyone come across this before?
> thanks
>|||Run this from a command prompt:
%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
This will install ASP.NET.
On a side note, you may want to turn off the ASP.NET State Service as this
is used for servers that act as session state servers for ASP.NET
applications that are configured to maintain session state out of process.
So this service is probably just using resources for nothing.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:ui3TDyx$EHA.2880@.TK2MSFTNGP14.phx.gbl...
> Did you by any chance remove the default website? RS needs the default
> website to be able to install.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
> news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> > When I attempt to install sql reporting services enterprise, i receive
the
> > following:
> > "System Check results--asp.net is not installed or is not registered
with
> > your web server".
> >
> > I review services and iisadmin is there and running as is also asp.net
> state
> > services which I had started to run automatically. Microsoft .net
> framework
> > 1.1 is confirmed installed in the add/remove programs.
> >
> > Anyone come across this before?
> >
> > thanks
> >
> >
>|||Your error happens when, for example, ASP.NET is installed and IIS isn't on
the machine or IIS is installed later. The aspnet_regiis.exe utility with
the -i parameter installs the correct IIS script maps so IIS associates
asp.net requests with the desired version of the framework. (Each framework
version has it's own aspnet_regiis.exe utility).
You should also be able to MSDN search that message and you will get more
information on the aspnet_regiis tool.
Adrian M.
"tom frost" <tomfrost@.discussions.microsoft.com> wrote in message
news:3ABC1970-87A4-47D2-8CFC-11A613861F72@.microsoft.com...
> When I attempt to install sql reporting services enterprise, i receive the
> following:
> "System Check results--asp.net is not installed or is not registered with
> your web server".
> I review services and iisadmin is there and running as is also asp.net
> state
> services which I had started to run automatically. Microsoft .net
> framework
> 1.1 is confirmed installed in the add/remove programs.
> Anyone come across this before?
> thanks
>

ASP.Net

Looking for some good examples of how folks used ASP.Net to pass in
parameters to SQL2005 Reporting Services - not liking how the parameters
have to be coded within the designer itself.We used a single string parameter and embedded an XML document within
that, translating it in a wrapping stored procedure to be the
parameters required by the real sp on the database.
This allowed us to do things like data driven parameters to the report
(in the ASP.Net web application we wrote as the front end)
Cheers
Greg
Joe wrote:
> Looking for some good examples of how folks used ASP.Net to pass in
> parameters to SQL2005 Reporting Services - not liking how the parameters
> have to be coded within the designer itself.|||I use stored procedures as the datasource and set the parameters with the
procedure variables. Using report parameters takes way too long on large data
sets from what I have experienced. All the data is loaded before the
filtering takes place (from what I was told).
"Joe" wrote:
> Looking for some good examples of how folks used ASP.Net to pass in
> parameters to SQL2005 Reporting Services - not liking how the parameters
> have to be coded within the designer itself.
>
>

ASP...

Let say I pass values from first page to second page using a form, how can I
retain the value in the corresponding area (text, radio button, texarea, dro
p
down menu)in the first page when i press the back button on the second page.
--
regards seowhuaYou've posted to the wrong newsgroup - this is for SQL Server, not ASP
programming. I'd try posting your question to one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups. (Ditto for your
"ASP Calendar..." post too.)
*mike hodgson*
blog: http://sqlnerd.blogspot.com
seowhua wrote:

>Let say I pass values from first page to second page using a form, how can
I
>retain the value in the corresponding area (text, radio button, texarea, dr
op
>down menu)in the first page when i press the back button on the second page
.
>sql

ASP. NET vs. PL/SQL

Hey guys, I am trying to rewrite an application with an Active Server Pages front-end that calls Oracle WebDB v2.2 reports. The data is all stored in an Oracle 9i database. What are some of the benefits and drawbacks of redesigning the application using an ASP .NET or PL/SQL
implementation. The redesigned application should still retrieve the data from the Oracle 9i database. Any help with this is greatly appreciated.When it comes to database development PL/SQL has the advantage since it is very flexible with Oracle and it seperates the business logic from the interface. But it lacks presentation in a nice way.

ASP.NET on the other hand can be developed to display data in very nice way. Performance wise PL/SQL would be better since it directly runs in the database server.

If the presentation of the report is not an issue then go for PL/SQL, or else you can go for ASP.NET

But remember to eveluate your skill level also on both and decide on one.

asp, trusted authentication, sql server 2000

hi...

i'm trying to write a database application using asp (not .net) and need to have it connect to SQL server 2000 using windows integrated security and trusted authentication. i have the following asp code:

DIM dbConn
set dbConn = Server.CreateObject("ADODB.Connection")
DBconn.Open "Driver={SQL Server};Server=DBSERVER;Database=MyDatabase;Truste d_Connection=yes"

i can access the page from the local webserver (http://localhost/sample.asp) but cannot access it from another machine. when i access it via another machine, it prompts for a un/pw but still says:

"Login failed for user (null). Reason: Not associated with a trusted SQL server connection"

please help...thanksHowdy,

Try setting up an ODBC connection ( make it use NT authentication ) on the web box to the SQL box and see if the problem goes away.

That may help establish where the problem is. Also, do you have same version of MDAC on web server & SQL Server boxes?

Cheers,

SG.|||i do have an odbc connection to the sql database on the web box (which currently is an xp pro machine for testing purposes, once i finish it will be moved to a 2000 server box)...how do i get it to use that specific connection?|||Try the following connection string:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydatabase;Data Source=dbserver

Also, your iis configuration may not be correct.|||After a good deal of troubleshooting, I have reason to believe that my IIS server is at fault. I do not know how to configure it correctly to use integrated security. I thought I had it correct - I do not allow Anonymous access, and under Authenticated access I have:

Digest authentication for Windows domain servers is checked (I've tried not using this, and recieved the same result)

Basic authentication (password is sent in clear text) is NOT checked

Integrated Windows authentication is checked.

When logging onto the ASP page, it does prompt for a user name and password. Upon entering my AD logon/password (which does have permission on the database), it errors out, reporting Login failed for user (null). This error is the same as it appears in SQL server's logs.

I can access it directly from the server without incident. Also, if i *do* allow anonymous access and use my credentials (as opposed to IUSER_blah), I can access it successfully. Otherwise, it reports the aforementioned error.

It might be mentioned that the machine I've been using to try to access the page is on XYZ domain, as is the IIS server - however, the SQL server is in the ABC domain. Does this matter?

ASP, SQL, long text data problems...

I have an ASP page that will take form info that a user has entered,
then save it into SQL server, and retrive and display the info on
another page. My problem is with long text data (10,000 bytes or
more). It appears to save the long text data, as in it gives no
errors... but it does not save it. In the SQL table, the field is
defined as ntext... So why won't it save?

Thanks in advance,
adamAdam (ootena@.imsg.com) writes:
> I have an ASP page that will take form info that a user has entered,
> then save it into SQL server, and retrive and display the info on
> another page. My problem is with long text data (10,000 bytes or
> more). It appears to save the long text data, as in it gives no
> errors... but it does not save it. In the SQL table, the field is
> defined as ntext... So why won't it save?

I guess you need to post your code, so that people here can have a
reasonble chance to spot your error. You are using the AppendChunk on
the Field object?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Adam (ootena@.imsg.com) writes:
> I guess I need an example of the GetChunk, AppendChunk... I havent
> been able to find one that makes sense to me.

In the MDAC Books Online there are examples of using AppendChunk. This
should also be on MSDN.

Did you try searching for AppendChunk on Google? I seem to get quite some
hits.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Cool, thanks for the books online... that helped a lot later man

ASP, SQL Server and double insert...

hello,
I have a little (big?) problem with a software in ASP / SQL Server.
This is a demo of the problem:

ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
ID= 12458 Data=21/01/2004 21:14:45 txt txt txt

So: I insert a record from my asp page but I find the same record for
more times... Why?"Fast" <falaweb@.yahoo.it> wrote in message
news:58f1ac75.0402240125.63d09a7c@.posting.google.c om...
> hello,
> I have a little (big?) problem with a software in ASP / SQL Server.
> This is a demo of the problem:
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> So: I insert a record from my asp page but I find the same record for
> more times... Why?

No idea.

It might help if you actually post code or something.

However, the fact that your table allows multiple rows of the same
information is bad. It indicates you don't have any sort of unique primary
key.|||falaweb@.yahoo.it (Fast) wrote in message news:<58f1ac75.0402240125.63d09a7c@.posting.google.com>...
> hello,
> I have a little (big?) problem with a software in ASP / SQL Server.
> This is a demo of the problem:
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> ID= 12458 Data=21/01/2004 21:14:45 txt txt txt
> So: I insert a record from my asp page but I find the same record for
> more times... Why?

I have no idea what the problem is from the ASP side, but you may be
able to troubleshoot by using Profiler to trace the SQL actually sent
to the server from ASP. You may find that the ASP code is not doing
exactly what you think it is.

In addition, you should add a primary key to your table to prevent
duplicate rows being inserted.

Simon

ASP, AS400 (iSeries), and stored procedures.

Does anyone have any info on how to call a stored procedure with asp classic
? Is it possible? I'm running client access v5r2.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...Yes it's possible. It's pretty much like calling any stored procedure. I've
done this using both the IBM Client Access ODBC driver as well as the IBM
Client access OLE DB Provider. The Data Access components need to be
installed on the system running the ASP scripts.
Mike O.
"ryadex" <ryadex@.hotmail.com> wrote in message
news:eHQZfJt1DHA.4032@.tk2msftngp13.phx.gbl...
quote:

> Does anyone have any info on how to call a stored procedure with asp

classic? Is it possible? I'm running client access v5r2.
quote:

>
> ****************************************
******************************
> Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...sql

ASP writing data to SQL Server 2000

I am having a problem with an ASP program that inserts data into a table on
SQL Server 2000.

No error msg is returned upon submission and the confirmation msg that
displays after the commit command is sent to the server displays, but when
we go to the DB, the data sent isn't there. This is an occassional
occurance and usually the data is there, just some times, it isn't. Other
forms function just fine, using the *exact* same file to perform the submit
function (all the forms "include" the same submit page). The only
difference we can find is a trigger on the table having problems which
executes upon update, capturing the information about who updated the record
when. From what we can see, this is the only programmatic difference. The
other thought tickling our minds was the possiblity of a simultaneous
submission, since all the users submit with the same db user name via the
form, if user 1's data gets written but not yet commited, user 2's data is
submitted, then the commit transaction is submitted by user 1 as the program
steps run in sequence, would the commit by user one cause eiither of the
records inserted but not commited to be lost? If so, why wouldn't that be causing problems on other forms ...Can you post some of the code that is being used? Particularly the trigger code... Also, use profiler to watch what is being sent to the SQL Server to determine if it is a SQL issue, or a ASP code issue.|||

Thank you Louis,

I will look into getting profiler turned on.

The trigger is as follows (specific variables replaced with generic names):

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE TRIGGER [trig_Table_doUpdateTimestamp] ON [dbo].[Table_1_0]
FOR UPDATE
AS
set nocount on
declare @.var1 datetime
declare @.var2 varchar(50)
declare @.var3 varchar(50)
declare @.var4 varchar(50)
declare @.var5 varchar(30)
set @.var1 = (select sourc_var1 from inserted)
set @.var2 = (select sourc_var2 from inserted)
set @.var3 = (select sourc_var3 from inserted)
set @.var4 = (select sourc_var4 from inserted)
set @.var5 = (select sourc_var5 from inserted)
update Table_1_0 set lastUpdateDT = getdate(), numberChanges = ( ( numberChanges + abs(numberChanges) ) /2 ) + 1 , lastupdateUser = SUSER_SNAME()
where sourc_var1 = @.var1 and sourc_var2 = @.var2 and sourc_var3 = @.var3 and sourc_var4 = @.var4 and sourc_var5 = @.var5
GO

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

ASP with SQL database in Unicode and double-byte environment

Dear all:
Would like to consult you with a question that has been bothering us a lot
in the past two weeks.
We recently purchased a software developed with ASP (well, we knew it would
be better with .Net, but could not find one with similar features).
And we are using this application in Windows Server 2003 environment and MS
SQL 2000 (with Collation set to Chinese).
The problem is that we consistently got random characters from those ASP
pages and dynamic web pages using the data from SQL.
We have checked and reset MS SQL many times and are sure that it does
support Chinese characters and data there are fine.
We even put the <% @.CodePage="950" %> on every page but still with the same
problem.
Interestingly enough, if we use MS Access, everything works fine (with the
same CodePage). All Chinese characters can display normally.
Does anyone know what might be the cause? Our application vendor seems
unable to solve the problem.
We don't even know if this is caused by the application or database.
Many thanks.
xfile wrote:
> Does anyone know what might be the cause? Our application vendor
> seems unable to solve the problem.
> We don't even know if this is caused by the application or database.
> Many thanks.
Does your database use UNICODE data types: nchar, nvarchar, ntext?
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Hi,
We set the entire collation to Windows Collation in Chinese_Taiwan
And I am not sure if that applies to your question?
Kindly tell me who to check if those are true?
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
> Does your database use UNICODE data types: nchar, nvarchar, ntext?
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||xfile wrote:[vbcol=seagreen]
> Hi,
> We set the entire collation to Windows Collation in Chinese_Taiwan
> And I am not sure if that applies to your question?
> Kindly tell me who to check if those are true?
> Many thanks.
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
You need to check the data types used in the tables to see if the vendor
is using unicode data types. You can't store unicode data in non-unicode
data types.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Hi,
Got it. We need to change to Unicode.
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ubHOFrtmFHA.2860@.TK2MSFTNGP15.phx.gbl...
> xfile wrote:
> You need to check the data types used in the tables to see if the vendor
> is using unicode data types. You can't store unicode data in non-unicode
> data types.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||xfile wrote:
> Hi,
> Got it. We need to change to Unicode.
> Many thanks.
It might not be that easy if this is a vendor application since there
might be application support for non-unicode data types.
The best thing to do is check with the vendor and get them to tell you
whether the application supports unicode data.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Hi,
Thanks. We've done it for this part.
The vendor claimed it support Unicode with language scripts but it is not
exactly working as they claimed.
We used their scripts to create database and tables and fields and so on,
but it did not even set the data type correctly.
It turned out we had to re-set the data type, and re-adjust length due to
SQL's limitation on 8060.
We are trying to solve another Unicode problem for their e-mail messages,
which I will post later.
Many thanks for your kind help.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23l%23V63BnFHA.3336@.tk2msftngp13.phx.gbl...
> xfile wrote:
> It might not be that easy if this is a vendor application since there
> might be application support for non-unicode data types.
> The best thing to do is check with the vendor and get them to tell you
> whether the application supports unicode data.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||xfile wrote:
> Hi,
> Thanks. We've done it for this part.
> The vendor claimed it support Unicode with language scripts but it is
> not exactly working as they claimed.
> We used their scripts to create database and tables and fields and so
> on, but it did not even set the data type correctly.
> It turned out we had to re-set the data type, and re-adjust length
> due to SQL's limitation on 8060.
> We are trying to solve another Unicode problem for their e-mail
> messages, which I will post later.
> Many thanks for your kind help.
If you are hitting the 8060 byte row limit, you might have table design
problems. That's an incredibly large row size. Consider using NTEXT
columns for long text to get the data out of the row.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Hi,
You are absolutely correct but we were reluctant to say it about the
inappropriate design of the database.
However, we have not time to fix this problem at this stage but would do it
at a later time.
Thanks again for the tips which will be very useful.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23YBwMlOnFHA.4032@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
> If you are hitting the 8060 byte row limit, you might have table design
> problems. That's an incredibly large row size. Consider using NTEXT
> columns for long text to get the data out of the row.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

ASP with SQL database in Unicode and double-byte environment

Dear all:
Would like to consult you with a question that has been bothering us a lot
in the past two weeks.
We recently purchased a software developed with ASP (well, we knew it would
be better with .Net, but could not find one with similar features).
And we are using this application in Windows Server 2003 environment and MS
SQL 2000 (with Collation set to Chinese).
The problem is that we consistently got random characters from those ASP
pages and dynamic web pages using the data from SQL.
We have checked and reset MS SQL many times and are sure that it does
support Chinese characters and data there are fine.
We even put the <% @.CodePage="950" %> on every page but still with the same
problem.
Interestingly enough, if we use MS Access, everything works fine (with the
same CodePage). All Chinese characters can display normally.
Does anyone know what might be the cause? Our application vendor seems
unable to solve the problem.
We don't even know if this is caused by the application or database.
Many thanks.xfile wrote:
> Does anyone know what might be the cause? Our application vendor
> seems unable to solve the problem.
> We don't even know if this is caused by the application or database.
> Many thanks.
Does your database use UNICODE data types: nchar, nvarchar, ntext?
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
We set the entire collation to Windows Collation in Chinese_Taiwan
And I am not sure if that applies to your question?
Kindly tell me who to check if those are true?
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
> Does your database use UNICODE data types: nchar, nvarchar, ntext?
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:[vbcol=seagreen]
> Hi,
> We set the entire collation to Windows Collation in Chinese_Taiwan
> And I am not sure if that applies to your question?
> Kindly tell me who to check if those are true?
> Many thanks.
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
You need to check the data types used in the tables to see if the vendor
is using unicode data types. You can't store unicode data in non-unicode
data types.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
Got it. We need to change to Unicode.
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ubHOFrtmFHA.2860@.TK2MSFTNGP15.phx.gbl...
> xfile wrote:
> You need to check the data types used in the tables to see if the vendor
> is using unicode data types. You can't store unicode data in non-unicode
> data types.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:
> Hi,
> Got it. We need to change to Unicode.
> Many thanks.
It might not be that easy if this is a vendor application since there
might be application support for non-unicode data types.
The best thing to do is check with the vendor and get them to tell you
whether the application supports unicode data.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
Thanks. We've done it for this part.
The vendor claimed it support Unicode with language scripts but it is not
exactly working as they claimed.
We used their scripts to create database and tables and fields and so on,
but it did not even set the data type correctly.
It turned out we had to re-set the data type, and re-adjust length due to
SQL's limitation on 8060.
We are trying to solve another Unicode problem for their e-mail messages,
which I will post later.
Many thanks for your kind help.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23l%23V63BnFHA.3336@.tk2msftngp13.phx.gbl...
> xfile wrote:
> It might not be that easy if this is a vendor application since there
> might be application support for non-unicode data types.
> The best thing to do is check with the vendor and get them to tell you
> whether the application supports unicode data.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:
> Hi,
> Thanks. We've done it for this part.
> The vendor claimed it support Unicode with language scripts but it is
> not exactly working as they claimed.
> We used their scripts to create database and tables and fields and so
> on, but it did not even set the data type correctly.
> It turned out we had to re-set the data type, and re-adjust length
> due to SQL's limitation on 8060.
> We are trying to solve another Unicode problem for their e-mail
> messages, which I will post later.
> Many thanks for your kind help.
If you are hitting the 8060 byte row limit, you might have table design
problems. That's an incredibly large row size. Consider using NTEXT
columns for long text to get the data out of the row.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
You are absolutely correct but we were reluctant to say it about the
inappropriate design of the database.
However, we have not time to fix this problem at this stage but would do it
at a later time.
Thanks again for the tips which will be very useful.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23YBwMlOnFHA.4032@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
> If you are hitting the 8060 byte row limit, you might have table design
> problems. That's an incredibly large row size. Consider using NTEXT
> columns for long text to get the data out of the row.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

ASP with SQL database in Unicode and double-byte environment

Dear all:
Would like to consult you with a question that has been bothering us a lot
in the past two weeks.
We recently purchased a software developed with ASP (well, we knew it would
be better with .Net, but could not find one with similar features).
And we are using this application in Windows Server 2003 environment and MS
SQL 2000 (with Collation set to Chinese).
The problem is that we consistently got random characters from those ASP
pages and dynamic web pages using the data from SQL.
We have checked and reset MS SQL many times and are sure that it does
support Chinese characters and data there are fine.
We even put the <% @.CodePage="950" %> on every page but still with the same
problem.
Interestingly enough, if we use MS Access, everything works fine (with the
same CodePage). All Chinese characters can display normally.
Does anyone know what might be the cause? Our application vendor seems
unable to solve the problem.
We don't even know if this is caused by the application or database.
Many thanks.xfile wrote:
> Does anyone know what might be the cause? Our application vendor
> seems unable to solve the problem.
> We don't even know if this is caused by the application or database.
> Many thanks.
Does your database use UNICODE data types: nchar, nvarchar, ntext?
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
We set the entire collation to Windows Collation in Chinese_Taiwan
And I am not sure if that applies to your question?
Kindly tell me who to check if those are true?
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
>> Does anyone know what might be the cause? Our application vendor
>> seems unable to solve the problem.
>> We don't even know if this is caused by the application or database.
>> Many thanks.
> Does your database use UNICODE data types: nchar, nvarchar, ntext?
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:
> Hi,
> We set the entire collation to Windows Collation in Chinese_Taiwan
> And I am not sure if that applies to your question?
> Kindly tell me who to check if those are true?
> Many thanks.
>
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
>> xfile wrote:
>> Does anyone know what might be the cause? Our application vendor
>> seems unable to solve the problem.
>> We don't even know if this is caused by the application or database.
>> Many thanks.
>> Does your database use UNICODE data types: nchar, nvarchar, ntext?
>> --
>> David Gugick
>> Quest Software
>> www.imceda.com
>> www.quest.com
You need to check the data types used in the tables to see if the vendor
is using unicode data types. You can't store unicode data in non-unicode
data types.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
Got it. We need to change to Unicode.
Many thanks.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:ubHOFrtmFHA.2860@.TK2MSFTNGP15.phx.gbl...
> xfile wrote:
>> Hi,
>> We set the entire collation to Windows Collation in Chinese_Taiwan
>> And I am not sure if that applies to your question?
>> Kindly tell me who to check if those are true?
>> Many thanks.
>>
>> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
>> news:OsuFr5bmFHA.3936@.TK2MSFTNGP10.phx.gbl...
>> xfile wrote:
>> Does anyone know what might be the cause? Our application vendor
>> seems unable to solve the problem.
>> We don't even know if this is caused by the application or database.
>> Many thanks.
>> Does your database use UNICODE data types: nchar, nvarchar, ntext?
>> --
>> David Gugick
>> Quest Software
>> www.imceda.com
>> www.quest.com
> You need to check the data types used in the tables to see if the vendor
> is using unicode data types. You can't store unicode data in non-unicode
> data types.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:
> Hi,
> Got it. We need to change to Unicode.
> Many thanks.
It might not be that easy if this is a vendor application since there
might be application support for non-unicode data types.
The best thing to do is check with the vendor and get them to tell you
whether the application supports unicode data.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
Thanks. We've done it for this part.
The vendor claimed it support Unicode with language scripts but it is not
exactly working as they claimed.
We used their scripts to create database and tables and fields and so on,
but it did not even set the data type correctly.
It turned out we had to re-set the data type, and re-adjust length due to
SQL's limitation on 8060.
We are trying to solve another Unicode problem for their e-mail messages,
which I will post later.
Many thanks for your kind help.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23l%23V63BnFHA.3336@.tk2msftngp13.phx.gbl...
> xfile wrote:
>> Hi,
>> Got it. We need to change to Unicode.
>> Many thanks.
> It might not be that easy if this is a vendor application since there
> might be application support for non-unicode data types.
> The best thing to do is check with the vendor and get them to tell you
> whether the application supports unicode data.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||xfile wrote:
> Hi,
> Thanks. We've done it for this part.
> The vendor claimed it support Unicode with language scripts but it is
> not exactly working as they claimed.
> We used their scripts to create database and tables and fields and so
> on, but it did not even set the data type correctly.
> It turned out we had to re-set the data type, and re-adjust length
> due to SQL's limitation on 8060.
> We are trying to solve another Unicode problem for their e-mail
> messages, which I will post later.
> Many thanks for your kind help.
If you are hitting the 8060 byte row limit, you might have table design
problems. That's an incredibly large row size. Consider using NTEXT
columns for long text to get the data out of the row.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Hi,
You are absolutely correct but we were reluctant to say it about the
inappropriate design of the database.
However, we have not time to fix this problem at this stage but would do it
at a later time.
Thanks again for the tips which will be very useful.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%23YBwMlOnFHA.4032@.TK2MSFTNGP10.phx.gbl...
> xfile wrote:
>> Hi,
>> Thanks. We've done it for this part.
>> The vendor claimed it support Unicode with language scripts but it is
>> not exactly working as they claimed.
>> We used their scripts to create database and tables and fields and so
>> on, but it did not even set the data type correctly.
>> It turned out we had to re-set the data type, and re-adjust length
>> due to SQL's limitation on 8060.
>> We are trying to solve another Unicode problem for their e-mail
>> messages, which I will post later.
>> Many thanks for your kind help.
> If you are hitting the 8060 byte row limit, you might have table design
> problems. That's an incredibly large row size. Consider using NTEXT
> columns for long text to get the data out of the row.
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

ASP upload image file

Im writing an asp page which allows users to upload files which are then
saved in a database table as an image. The problem is that the webpage is on
one server and the data is stored on another server, I can save the image to
the server the webpages are on but not the other, just get the error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.
Is it possible to do this?
Chris,
is the db on the same internal network as the webserver?
if it is i dont think thats your problem, post some code.
Mike
www.michaelevanchik.com
"chris2583" wrote:

> Im writing an asp page which allows users to upload files which are then
> saved in a database table as an image. The problem is that the webpage is on
> one server and the data is stored on another server, I can save the image to
> the server the webpages are on but not the other, just get the error:
> ADODB.Recordset error '800a0cb3'
> Current Recordset does not support updating. This may be a limitation of the
> provider, or of the selected locktype.
> Is it possible to do this?
|||For Each File In Uploader.Files.Items
' Open the table you are saving the file to
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "select * from test",conn,2,2
RS.AddNew ' create a new record
RS("filename") = File.FileName
RS("filesize") = File.FileSize
RS("contenttype") = File.ContentType
' Save the file to the database
File.SaveToDatabase RS("filedata")
' Commit the changes and close
RS.Update
RS.Close
Next
All the servers are on the same internal network. I have an included asp
page which has the FileUploader class. This is the code that works, when I
change source parameter in the RS.Open line to the table on the other server
it fails on the RS.AddNew line.
"Michael Evanchik" wrote:

> Chris,
> is the db on the same internal network as the webserver?
> if it is i dont think thats your problem, post some code.
> Mike
> www.michaelevanchik.com
>
sql

ASP upload image file

Im writing an asp page which allows users to upload files which are then
saved in a database table as an image. The problem is that the webpage is on
one server and the data is stored on another server, I can save the image to
the server the webpages are on but not the other, just get the error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the
provider, or of the selected locktype.
Is it possible to do this?Chris,
is the db on the same internal network as the webserver?
if it is i dont think thats your problem, post some code.
Mike
www.michaelevanchik.com
"chris2583" wrote:

> Im writing an asp page which allows users to upload files which are then
> saved in a database table as an image. The problem is that the webpage is
on
> one server and the data is stored on another server, I can save the image
to
> the server the webpages are on but not the other, just get the error:
> ADODB.Recordset error '800a0cb3'
> Current Recordset does not support updating. This may be a limitation of t
he
> provider, or of the selected locktype.
> Is it possible to do this?|||For Each File In Uploader.Files.Items
' Open the table you are saving the file to
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "select * from test",conn,2,2
RS.AddNew ' create a new record
RS("filename") = File.FileName
RS("filesize") = File.FileSize
RS("contenttype") = File.ContentType
' Save the file to the database
File.SaveToDatabase RS("filedata")
' Commit the changes and close
RS.Update
RS.Close
Next
All the servers are on the same internal network. I have an included asp
page which has the FileUploader class. This is the code that works, when I
change source parameter in the RS.Open line to the table on the other server
it fails on the RS.AddNew line.
"Michael Evanchik" wrote:

> Chris,
> is the db on the same internal network as the webserver?
> if it is i dont think thats your problem, post some code.
> Mike
> www.michaelevanchik.com
>

ASP to SQL Connection Prob, Same Server, IIS

Yes, it should be easy...

I have a single box hosing IIS and SQL Server 2000. In my ASP script I've
tried using the following connection strings to attempt to connect to no
avail:

"Provider=SQLOLEDB;Server=servername\instancename,1 433;Database=TEST;network=DBMSSOCN;uid=TEST;pwd=TE ST"
"Provider=SQLOLEDB;Server=local IP
address\instancename,1433;Database=TEST;network=DB MSSOCN;uid=TEST;pwd=TEST"

"Provider=SQLOLEDB;Server=external IP
address\servername\instancename;Database=TEST;netw ork=DBMSSOCN;uid=TEST;pwd=TEST"

Getting error:

"Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found."

SQL Server is set up for SQL and Windows authentication. Server utility is
configured for both named pipes and TCP/IP. Port is set to 1433.

I can connect to the DB using Query Analyzer both from the local server
itself AND from a remote laptop over the internet.

So, what am I missing???

Thanks in advance,

ChadChad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> SQL Server is set up for SQL and Windows authentication. Server utility is
> configured for both named pipes and TCP/IP. Port is set to 1433.

But you have a named instance. Yes, you can of course have a named
instance on port 1433, but normally this is where you have the unnamed
instance.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||OK. But if you can have one, than do you have any other ideas on why it
would not connect?

I have this same set up on my development laptop and it connects fine,
except that my web site on the laptop is served up from a virtual directory.
On the home development box, the web site is located under the
InetPub\wwwroot folder. Not sure if this would change the "perspective" that
the connection call is coming from and hence would require a different
syntax...

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns960E3D672D9AYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> SQL Server is set up for SQL and Windows authentication. Server utility
>> is
>> configured for both named pipes and TCP/IP. Port is set to 1433.
> But you have a named instance. Yes, you can of course have a named
> instance on port 1433, but normally this is where you have the unnamed
> instance.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> OK. But if you can have one, than do you have any other ideas on why it
> would not connect?

I asked my question mainly as incentive for you to double-check.

> I have this same set up on my development laptop and it connects fine,
> except that my web site on the laptop is served up from a virtual
> directory. On the home development box, the web site is located under
> the InetPub\wwwroot folder. Not sure if this would change the
> "perspective" that the connection call is coming from and hence would
> require a different syntax...

I don't really see why either. Then again, I'm completely ignorant about
IIS.

But there is one thing I don't like in your connection string:
network=DBMSSOCN. I believe this library is out-dated. Not that I
think it matters, but remove it.

And, hm, what about removing 1433? After all there is a service to
find the port. And then there is shared memory which does not even need a
port...

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

ASP to SQL 2005 - won't connect

Hi All,
I'm having a bit of a nightmare and could really do with some help.
Our office server is running SQL 2005 Express.
We have installed SQL 2005 Express in our remote web server. I want the web
server to 'collect' data from the office server over night. We cannot get
the two to connect.
We have an ASP file on our web server with following code:
<%
Dim connL
Set connL = Server.CreateObject("ADODB.Connection")
connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
address;Network Library=DBMSSOCN"
%>
When we run this page we get the error message:
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
Please help.
Regards
Andrew Ellinas
By default, SQL-Server 2005 Express won't allow for remote connection so you
have to enable TCP/IP using the the SQL Server Surface Area Configuration
tool. You should also make sure that there is no firewall blocking the port
1433. For reason I don't remember, it's better to simply use SQLOLEDB
instead of SQLOLEDB.1 and in the case of SQL-Server 2005, it's even better
to use the new provider SQLNCLI; see
http://connectionstrings.com/?carrier=sqlserver2005 . Finally, if you have
installed a named instance instead of the default instance, you must add the
name of the instance after the address of the server.
Are you able to connect to it using either MSSMS or MSSMSE?
Here a some other articles to help you troubleshooting your connection
problem:
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (second site for
connection strings for sql providers)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Andrew Ellinas" <Andrew Ellinas@.discussions.microsoft.com> wrote in message
news:889ABEEF-F32B-4C1B-9B1A-C813367C8BF4@.microsoft.com...
> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the
> web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>
|||Thank you for taking time to post such a full answer.
I will work my way through what you suggest and post what happens.
Once again, thank you.
"Andrew Ellinas" wrote:

> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>

ASP to SQL 2005 - won't connect

Hi All,
I'm having a bit of a nightmare and could really do with some help.
Our office server is running SQL 2005 Express.
We have installed SQL 2005 Express in our remote web server. I want the web
server to 'collect' data from the office server over night. We cannot get
the two to connect.
We have an ASP file on our web server with following code:
<%
Dim connL
Set connL = Server.CreateObject("ADODB.Connection")
connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
address;Network Library=DBMSSOCN"
%>
When we run this page we get the error message:
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
Please help.
Regards
Andrew EllinasBy default, SQL-Server 2005 Express won't allow for remote connection so you
have to enable TCP/IP using the the SQL Server Surface Area Configuration
tool. You should also make sure that there is no firewall blocking the port
1433. For reason I don't remember, it's better to simply use SQLOLEDB
instead of SQLOLEDB.1 and in the case of SQL-Server 2005, it's even better
to use the new provider SQLNCLI; see
http://connectionstrings.com/?carrier=sqlserver2005 . Finally, if you have
installed a named instance instead of the default instance, you must add the
name of the instance after the address of the server.
Are you able to connect to it using either MSSMS or MSSMSE?
Here a some other articles to help you troubleshooting your connection
problem:
http://blogs.msdn.com/sqlexpress/ar.../05/415084.aspx
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (second site for
connection strings for sql providers)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Andrew Ellinas" <Andrew Ellinas@.discussions.microsoft.com> wrote in message
news:889ABEEF-F32B-4C1B-9B1A-C813367C8BF4@.microsoft.com...
> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the
> web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connecti
on
> Please help.
> Regards
> Andrew Ellinas
>
>|||Thank you for taking time to post such a full answer.
I will work my way through what you suggest and post what happens.
Once again, thank you.
"Andrew Ellinas" wrote:

> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the w
eb
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connecti
on
> Please help.
> Regards
> Andrew Ellinas
>
>sql

Asp to asp.net convertor

I would like to know about the website who had convert the code asp to asp.net

please help me

Ashwani Kumar

I'd be surprised if this could be done.

It's not a case of changing syntax or replacing all "A"s with "B"s. You're replacing all your Response.Write or HTML strings with controls and I can't see how aany converter could tell that your HTML block needs to be replaced with a gridview, formview or repeater.

I'm willing to be proved wrong though!

|||

Thanks

|||

For migrating sites from ASP to ASP.Net my suggestion is to follow this migration guide.

http://www.asp.net/downloads/archived/migration-assistants/asp-to-aspnet/

|||

Yes. This can be donw. The ASP to ASP.NET Migration Assistant is designed to help you convert ASP pages and applications to ASP.NET. It does not make the conversion process completely automatic, but it will speed up your project by automating some of the steps required for migration.

You can download at:http://msdn2.microsoft.com/en-us/asp.net/aa336624.aspx

Also see how to use this assistance tool : http://www.asp101.com/articles/john/asptoaspnet/default.asp

Hope my suggestion helps

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

ASP SQL Server slow connection

I just migrated the database and web pages from one machine to another
machine. The speed of the original web pages are faster than the current
one. I think there is no problem on the web pages, but maybe the setting
problem in IIS or SQL Server
I wonder if anything to do on IIS or SQL Server settings'This thread is active in other groups still.
Ray at work
"John Davis" <jrefactor@.hotmail.com> wrote in message
news:e2myQeJfDHA.2292@.TK2MSFTNGP10.phx.gbl...
> I just migrated the database and web pages from one machine to another
> machine. The speed of the original web pages are faster than the current
> one. I think there is no problem on the web pages, but maybe the setting
> problem in IIS or SQL Server
> I wonder if anything to do on IIS or SQL Server settings'
>|||Hello,
Try this KB article :
FIX: Connection to SQL Server Database Using IP Address Is Unusually
Slow
http://support.microsoft.com/?id=300420
Regards,
Paul Lynch
MCSE

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanks
There are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks
|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=userID;PWD=p assword;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanksThere are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=us
erID;PWD=password;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

ASP sp execution returning closed recordset

Can anybody tell me why a) when running a stored proc from an asp page to
return a recordset the command succeeds if the sp queries an existing table
directly, but b) if the stored proc populates results into a different
table, temporary table, global temp table, or table variable, then queries
one of these, the asp page reports that the recordset object is closed. If
using a table, I have set grant, select, update, delete permissions for the
asp page user account, so it doesn't appear to be a permissioning issue. If
run in Query Analyser the sp runs fine of course.

Abridged asp code is as follows:
StoredProc = Request.querystring("SP")
oConn.ConnectionString = "Provider=SQLOLEDB etc"
oConn.Open
set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = oConn
oCmd.CommandText = StoredProc
oCmd.CommandType = adCmdStoredProc
oCmd.Parameters.Refresh
'code here that populates the parameters of the oCmd object correctly
Set oRs = Server.CreateObject("ADODB.Recordset")
With oRS
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
'execute the SP returning the result into a recordset
.Open oCmd
End With
' Save data into IIS response object
Response.ContentType = "text/xml"
oRs.Save Response, adPersistXML
'the line above fails with stored procs from example B below, reporting "not
allowed when object is closed", but works with example A

SP Example A - this one works fine
Create Proc spTestA AS
SELECT ID FROM FileList
GO

SP Example B - this one doesn't work from ASP but runs fine in QA
Create Proc spTestB AS
DECLARE @.Results Table (ID TinyInt)
INSERT INTO @.Results SELECT ID FROM FileList
SELECT ID FROM @.Results
GO

I can see the SP executing using profiler when the asp page is called for
both sp's above, so it doesn't appear to be a problem with the execution.
It's something to do with returning the result set from the table variable.

Thanks,

Robin Hammond"Robin Hammond" wrote:

<snip
> SP Example B - this one doesn't work from ASP but runs fine in QA
> Create Proc spTestB AS
> DECLARE @.Results Table (ID TinyInt)
> INSERT INTO @.Results SELECT ID FROM FileList
> SELECT ID FROM @.Results
> GO

<snip
Robin,

The problem is that you're getting back a closed recordset with "records
affected" info from SQL Server: using the NextRecordset method in ADO will
get the actual recordset you're looking for. A good rule of thumb is to
watch the output from a stored proc in QA: anytime you see a resultset or a
message about records affected, then you know this could pop up.

A more efficient solution (and the one I prefer) if you don't need any data
back but the result of the SELECT is to use SET NOCOUNT...

Create Proc spTestB AS
SET NOCOUNT ON
DECLARE @.Results Table (ID TinyInt)
INSERT INTO @.Results SELECT ID FROM FileList

SET NOCOUNT OFF
SELECT ID FROM @.Results
GO

Craigsql

ASP search screen and MS-SQL 2k

Hello,

I am looking for help with the following situation.

I have created a simple call tracking system that is integrated
with our accounting / warehousing program in the company. The call
tracking system uses ASP 3.0 and MSSQL 2000 sitting on an Intranet web
server. All appears to be working well with the software. I am
trying to create a search screen to search through the calls based on
different criteria.

I have an ASP script that generates a SELECT statement based on
the selected criteria but this is sent off to the SQL server as the
statement. I want to use a stored procedure to speed up the process.
Is it possible to create a stored procedure for this search even when
the WHERE clause and criteria keeps changing?

TIALook into Full Text Indexing on your SQL Server tables. There is a Sql
Service dedicated to this. This article touches on the capability...

http://www.sqlmag.com/Articles/Index.cfm?ArticleID=8967

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz

"rdlebreton" <rdlebreton@.hotmail.com> wrote in message
news:80376060.0312111117.4f999bf2@.posting.google.c om...
> Hello,
> I am looking for help with the following situation.
> I have created a simple call tracking system that is integrated
> with our accounting / warehousing program in the company. The call
> tracking system uses ASP 3.0 and MSSQL 2000 sitting on an Intranet web
> server. All appears to be working well with the software. I am
> trying to create a search screen to search through the calls based on
> different criteria.
> I have an ASP script that generates a SELECT statement based on
> the selected criteria but this is sent off to the SQL server as the
> statement. I want to use a stored procedure to speed up the process.
> Is it possible to create a stored procedure for this search even when
> the WHERE clause and criteria keeps changing?
> TIA|||[posted and mailed, please reply in news]

rdlebreton (rdlebreton@.hotmail.com) writes:
> I am looking for help with the following situation.
> I have created a simple call tracking system that is integrated
> with our accounting / warehousing program in the company. The call
> tracking system uses ASP 3.0 and MSSQL 2000 sitting on an Intranet web
> server. All appears to be working well with the software. I am
> trying to create a search screen to search through the calls based on
> different criteria.
> I have an ASP script that generates a SELECT statement based on
> the selected criteria but this is sent off to the SQL server as the
> statement. I want to use a stored procedure to speed up the process.
> Is it possible to create a stored procedure for this search even when
> the WHERE clause and criteria keeps changing?

Yes, although the way to gain speed is more likely to review indexing,
or constrain what users can search on.

Anyway, I have an article on the topic on my web site. It's a bit
long, but it covers the topic fairly extensively. The link is
http://www.algonet.se/~sommar/dyn-search.html.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns944F3B58AE2FYazorman@.127.0.0.1>...
> [posted and mailed, please reply in news]
<snip!
Holy S--!

You've got a lot on this web site!

It's going to take me the whole weekend to digest it all.

Thanks

Thursday, March 22, 2012

ASP script to display database structure?

Posted this to SQLServer.Tools, but maybe it belongs here...
Does anyone have an ASP script that I can use to dump the structure of an MS
SQL 2000 database?
The firewall here won't allow any remote connections through, and our DB
host does not have any web administration.
I just need the table names, field names, and field data types.
Thx!would information_schema.tables and information_schema.columns do?
Just join the views and select the columns you need.
SELECT *
FROM information_schema.tables t
JOIN information_schema.columns c
ON t.table_schema = c.table_schema
AND t.table_name = c.table_name
"Noozer" wrote:

> Posted this to SQLServer.Tools, but maybe it belongs here...
>
> Does anyone have an ASP script that I can use to dump the structure of an
MS
> SQL 2000 database?
> The firewall here won't allow any remote connections through, and our DB
> host does not have any web administration.
> I just need the table names, field names, and field data types.
> Thx!
>
>|||Thanks!
That did the trick!
"Nigel Rivett" <NigelRivett@.discussions.microsoft.com> wrote in message
news:46273214-5138-4D9F-A0EB-7C1AC0B70344@.microsoft.com...
> would information_schema.tables and information_schema.columns do?
> Just join the views and select the columns you need.
> SELECT *
> FROM information_schema.tables t
> JOIN information_schema.columns c
> ON t.table_schema = c.table_schema
> AND t.table_name = c.table_name

ASP returning null sized field from MS SQL database

We currently have an SQL db running on a web server.
One of these fields is a large(ish) amount of text data up to 400
characters and has been cast variously as varchar, nchar and text
type to overcome a problem. The problem appears to be in retrieving
the data via ASP. I understand that ASP can handle string data of this
size so I am okay there.
When the records are retrieved from the db, the data string length =0.
I know the data is there because I have written a Delphi data manager
which interrogates the db and shows all records and their contents.
So if ASP can handle strings this size and the data is there, why do I
get a data length of zero bytes returned when I interrogate the record
set?
Whichever way I cast this field I get the same result.

I know the code is sound as it works locally through a MS SQL server
on my PS.
Anyone have this problem or know what's causing it? I have logged a
support call with my hosting company, but they haven't replied as yet
and I am stuck on an urgent project.

Any suggestions?

Cheers
GrantGrant Davis (grant@.gbdavis.com) writes:
> We currently have an SQL db running on a web server.
> One of these fields is a large(ish) amount of text data up to 400
> characters and has been cast variously as varchar, nchar and text
> type to overcome a problem. The problem appears to be in retrieving
> the data via ASP. I understand that ASP can handle string data of this
> size so I am okay there.
> When the records are retrieved from the db, the data string length =0.
> I know the data is there because I have written a Delphi data manager
> which interrogates the db and shows all records and their contents.
> So if ASP can handle strings this size and the data is there, why do I
> get a data length of zero bytes returned when I interrogate the record
> set?
> Whichever way I cast this field I get the same result.
> I know the code is sound as it works locally through a MS SQL server
> on my PS.
> Anyone have this problem or know what's causing it? I have logged a
> support call with my hosting company, but they haven't replied as yet
> and I am stuck on an urgent project.
> Any suggestions?

Yes one: Post the relevant pieces of your code. Today it is a beautiful
day here in Stockholm, the sun is shining from blue skies. Nevertheless,
I am completely in the dark about what you are doing.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

ASP query to SQL db

<% Datum = "1/1/2005"
Datum = cdate(datum)
Datum2 = datum + 9
Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
& ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
I am tryng to query some data according to dates...No matter hw I
change the format of the date variables, my recordset still returns no
data.
Any ideas, suggestions please. Any help will be gr8ly appreciated..thanxThis gives you a good overview of how you should pass datetime values and also recommendations on
how to construct searches on datetime ranges:
http://www.karaszi.com/SQLServer/info_datetime.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>|||Thanx for the site Tibor. Contains alot of usefull and interesting
information, unfortunately none of them helpd solve my problem
Tibor Karaszi wrote:
> This gives you a good overview of how you should pass datetime values and also recommendations on
> how to construct searches on datetime ranges:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> > <% Datum = "1/1/2005"
> > Datum = cdate(datum)
> > Datum2 = datum + 9
> >
> >
> > Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> > Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> >
> > sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> > R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> > SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> > AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> > & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> > R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> >
> > I am tryng to query some data according to dates...No matter hw I
> > change the format of the date variables, my recordset still returns no
> > data.
> >
> > Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
> >|||Run a Profiler trace so you see that SQL command submitted to SQL Server. Format the datetime
strings so they are language neutral.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161168200.659185.119520@.f16g2000cwb.googlegroups.com...
> Thanx for the site Tibor. Contains alot of usefull and interesting
> information, unfortunately none of them helpd solve my problem
> Tibor Karaszi wrote:
>> This gives you a good overview of how you should pass datetime values and also recommendations on
>> how to construct searches on datetime ranges:
>> http://www.karaszi.com/SQLServer/info_datetime.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "amatuer" <njoosub@.gmail.com> wrote in message
>> news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
>> > <% Datum = "1/1/2005"
>> > Datum = cdate(datum)
>> > Datum2 = datum + 9
>> >
>> >
>> > Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
>> > Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
>> >
>> > sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
>> > R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
>> > SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
>> > AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
>> > & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
>> > R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
>> >
>> > I am tryng to query some data according to dates...No matter hw I
>> > change the format of the date variables, my recordset still returns no
>> > data.
>> >
>> > Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>> >
>|||You need to add single quote mark around the date value in WHERE clause;
also, since Datun and Datum2 have been already formatted into a "mm-dd-yyyy"
format (hopefully, your SQL Server recognise date that way, not
"dd-mm-yyyy"), you do not need to convert it back to Date type with cdate():
"SEELCT ... WHERE...(R_Reenval.Datum Between '" & Datum & "' And '" & Datum2
& "')
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>|||amatuer wrote:
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
Display the contents of the sql string somewhere on your page so that
you can see the SELECT statement that you've just built. I think
you'll see that you're missing single quotes around your date values.|||thanx norman, i was blind that day..lol
Norman Yuan wrote:
> You need to add single quote mark around the date value in WHERE clause;
> also, since Datun and Datum2 have been already formatted into a "mm-dd-yyyy"
> format (hopefully, your SQL Server recognise date that way, not
> "dd-mm-yyyy"), you do not need to convert it back to Date type with cdate():
> "SEELCT ... WHERE...(R_Reenval.Datum Between '" & Datum & "' And '" & Datum2
> & "')
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> > <% Datum = "1/1/2005"
> > Datum = cdate(datum)
> > Datum2 = datum + 9
> >
> >
> > Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> > Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> >
> > sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> > R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> > SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> > AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> > & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> > R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> >
> > I am tryng to query some data according to dates...No matter hw I
> > change the format of the date variables, my recordset still returns no
> > data.
> >
> > Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
> >sql

ASP query to SQL db

<% Datum = "1/1/2005"
Datum = cdate(datum)
Datum2 = datum + 9
Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
& ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
I am tryng to query some data according to dates...No matter hw I
change the format of the date variables, my recordset still returns no
data.
Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
This gives you a good overview of how you should pass datetime values and also recommendations on
how to construct searches on datetime ranges:
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegrou ps.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>
|||Thanx for the site Tibor. Contains alot of usefull and interesting
information, unfortunately none of them helpd solve my problem
Tibor Karaszi wrote:[vbcol=seagreen]
> This gives you a good overview of how you should pass datetime values and also recommendations on
> how to construct searches on datetime ranges:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1161165428.268825.43060@.i3g2000cwc.googlegrou ps.com...
|||Run a Profiler trace so you see that SQL command submitted to SQL Server. Format the datetime
strings so they are language neutral.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161168200.659185.119520@.f16g2000cwb.googlegr oups.com...
> Thanx for the site Tibor. Contains alot of usefull and interesting
> information, unfortunately none of them helpd solve my problem
> Tibor Karaszi wrote:
>
|||You need to add single quote mark around the date value in WHERE clause;
also, since Datun and Datum2 have been already formatted into a "mm-dd-yyyy"
format (hopefully, your SQL Server recognise date that way, not
"dd-mm-yyyy"), you do not need to convert it back to Date type with cdate():
"SEELCT ... WHERE...(R_Reenval.Datum Between '" & Datum & "' And '" & Datum2
& "')
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegrou ps.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>
|||amatuer wrote:
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
Display the contents of the sql string somewhere on your page so that
you can see the SELECT statement that you've just built. I think
you'll see that you're missing single quotes around your date values.

ASP query to SQL db

<% Datum = "1/1/2005"
Datum = cdate(datum)
Datum2 = datum + 9
Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
& ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
I am tryng to query some data according to dates...No matter hw I
change the format of the date variables, my recordset still returns no
data.
Any ideas, suggestions please. Any help will be gr8ly appreciated..thanxThis gives you a good overview of how you should pass datetime values and al
so recommendations on
how to construct searches on datetime ranges:
http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>|||Thanx for the site Tibor. Contains alot of usefull and interesting
information, unfortunately none of them helpd solve my problem
Tibor Karaszi wrote:[vbcol=seagreen]
> This gives you a good overview of how you should pass datetime values and
also recommendations on
> how to construct searches on datetime ranges:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...|||Run a Profiler trace so you see that SQL command submitted to SQL Server. Fo
rmat the datetime
strings so they are language neutral.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161168200.659185.119520@.f16g2000cwb.googlegroups.com...
> Thanx for the site Tibor. Contains alot of usefull and interesting
> information, unfortunately none of them helpd solve my problem
> Tibor Karaszi wrote:
>|||You need to add single quote mark around the date value in WHERE clause;
also, since Datun and Datum2 have been already formatted into a "mm-dd-yyyy"
format (hopefully, your SQL Server recognise date that way, not
"dd-mm-yyyy"), you do not need to convert it back to Date type with cdate():
"SEELCT ... WHERE...(R_Reenval.Datum Between '" & Datum & "' And '" & Datum2
& "')
"amatuer" <njoosub@.gmail.com> wrote in message
news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
>|||amatuer wrote:
> <% Datum = "1/1/2005"
> Datum = cdate(datum)
> Datum2 = datum + 9
>
> Datum = Month(Datum) & "-" & Day(Datum) & "-" & Year(Datum)
> Datum2 = Month(Datum2) & "-" & Day(Datum2) & "-" & Year(Datum2)
> sql = "SELECT R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo, Sum(Reenval_Silo) AS
> SumOfReenval_Silo FROM R_Reenval WHERE ((R_Reenval.NAAM)='klerksdorp')
> AND (R_Reenval.Datum Between " & cdate(Datum) & " And " & cdate(Datum2)
> & ") Group By R_Reenval.NAAM, R_Reenval.Jaar, R_Reenval.Maand,
> R_Reenval.Dag, R_Reenval.Reenval_Silo ORDER BY Jaar, Maand, Dag" %>
> I am tryng to query some data according to dates...No matter hw I
> change the format of the date variables, my recordset still returns no
> data.
> Any ideas, suggestions please. Any help will be gr8ly appreciated..thanx
Display the contents of the sql string somewhere on your page so that
you can see the SELECT statement that you've just built. I think
you'll see that you're missing single quotes around your date values.|||thanx norman, i was blind that day..lol
Norman Yuan wrote:[vbcol=seagreen]
> You need to add single quote mark around the date value in WHERE clause;
> also, since Datun and Datum2 have been already formatted into a "mm-dd-yyy
y"
> format (hopefully, your SQL Server recognise date that way, not
> "dd-mm-yyyy"), you do not need to convert it back to Date type with cdate(
):
> "SEELCT ... WHERE...(R_Reenval.Datum Between '" & Datum & "' And '" & Datu
m2
> & "')
> "amatuer" <njoosub@.gmail.com> wrote in message
> news:1161165428.268825.43060@.i3g2000cwc.googlegroups.com...

ASP Programming Question (build a calendar and connect with SQL Se

Hi anyone,
I wish to build an ASP calendar table and when I click on the calendar
specific date, it will automatically add the date into the SQL Server table.
The table must be in Year, month and date
--
regards seowhuaHi
Please visit at http://www.aspfaq.com/show.asp?id=2519 written by Aaron
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:3552695A-4AF2-4AE9-9AA6-8723A1B33230@.microsoft.com...
> Hi anyone,
> I wish to build an ASP calendar table and when I click on the calendar
> specific date, it will automatically add the date into the SQL Server
> table.
> The table must be in Year, month and date
> --
> regards seowhua

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error message
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?
You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
************************************************** *****************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
************************************************** *****************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error messag
e
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?sql