Showing posts with label programmer. Show all posts
Showing posts with label programmer. Show all posts

Friday, March 30, 2012

MS SQL This feature has not been implemented yet

Hi, I'm a Delphi programmer, and using an ADO Dataset, I'm trying to select some data from a database. However, when I set it up using parameters, I get an error in Delphi that this Feature has not been implemented yet. Can anyone help me configure the MS SQL database, so I can run SQL queries with parameters?which version of Delphi and SQL are you using. I use D6 with SQL 2k and have no problems (well, almost none) using an ADO dataset. What is your sql statement and how did you define your parameters?|||I am using Delphi version 7 and MS SQL 2000. Here is the Commandtext from my ADODataset:

select count(*) from CallDetail calldetail where i3timestampgmt between :BegTime and :EndTime and initiateddate between :BegTime2 and :EndTime2 and LocalUserId = :User

If I plug in actual values in the SQL instead of parameters, the script runs just fine. Then here is how I defined the parameters:

dmReports.ADODataSet1.Parameters.ParamByName('BegT ime').Value := FormatDateTime('mm/dd/yyyy hh:nn', BegDate);
dmReports.ADODataSet1.Parameters.ParamByName('EndT ime').Value := FormatDateTime('mm/dd/yyyy hh:nn', EndDate + 1);
dmReports.ADODataSet1.Parameters.ParamByName('BegT ime2').Value := FormatDateTime('mm/dd/yyyy hh:nn', BegDate);
dmReports.ADODataSet1.Parameters.ParamByName('EndT ime2').Value := FormatDateTime('mm/dd/yyyy hh:nn', EndDate + 1);
dmReports.ADODataSet1.Parameters.ParamByName('User ').Value := workgroupmembers[i];
dmReports.ADODataSet1.Active := True;
ShowMessage(dmReports.ADODataSet1COLUMN1.AsString) ;

At the beginning of the procedure I defined them like this:

BegTime, EndTime, BegTime2, EndTime2, User: Variant;|||your declarations seem ok at first sight. My guess would be to change the parameter named 'user' to another name because this is keyword used by sql server.|||I tried changing User to Operator, and it is still giving the exact same error. I am guessing that the MS SQL is not configured correctly, and maybe under the current configuration it can't handle parameters.|||I don't see how it could be configured to not accept parametrized queries from a client application. What is the exact error message you get? If you click on the parameters property in the object inspector, does it display all your parameters correctly?|||In the object inspector all the parameters are displayed correctly. Here is the message that I receive

--------
Debugger Exception Notification
--------
Project report.exe raised exception class EOleException with message '[Microsoft][ODBC SQL Server Driver]Optional feature not implemented'. Process stopped. Use Step or Run to continue.
--------
OK Help
--------|||There is nothing to configure in sql server to allow it to accept queries.
Depends on what is being sent to the server by the app as to whether it will work.
Try using the sql server profiler to trace what is being sent.

Check the delphi documentation and the provider you are using as the error is comming probably comming from one of these|||see http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q214/4/59.asp&NoWebContent=1 for more info.|||I just ran the SQL Server Profiler from the Server, and that query is not even showing up there. I know that it connects however, because when I run a query without the parameters, it does show up.

Also, I beleive that the Microsoft website is talking about Visual Basic, instead of Delphi.|||Thanks for all your help jora and nigellrivett. I couldn't get it working, so I decided that instead of using parameters, I'd set the commandtext property directly with the right values in a procedure in Delphi.sql

Monday, March 12, 2012

MS SQL Express Advanced vs MS SQL full version vs MySQL

I'm planning to transport a desktop application to the web. A spin-off of
this application has already been put on the web by another programmer. He
used ColdFusion with MS SQL, Access, VC, and Java. It is faster than the
desktop application (written in VFP).
1. Can I get the same results using MS SQL Express Advanced and Access for
the internet version if used with .net?
2. Are the select statements limited in power, accuracy, size, etc. for MS
SQL Express Advanced when compared to SQL?
3. If Access will perform poorly, can VFP be used instead with .net? I
already know it can't be used with ColdFusion. 4. If MS Express Advanced
will not sufficiently replace SQL, will MySQL do the job better?

Thanks(wipeout64@.hotmail.com) writes:

Quote:

Originally Posted by

I'm planning to transport a desktop application to the web. A spin-off of
this application has already been put on the web by another programmer. He
used ColdFusion with MS SQL, Access, VC, and Java. It is faster than the
desktop application (written in VFP).
1. Can I get the same results using MS SQL Express Advanced and Access for
the internet version if used with .net?


Probably. But you could also get worse performance. It's difficult to
answer, because it depends on how you do the implementation. DB engines
are extremely powerful tools to make things to really slow if you don't
do things right.

Quote:

Originally Posted by

2. Are the select statements limited in power, accuracy, size, etc. for MS
SQL Express Advanced when compared to SQL?


Compared to what? If you mean if there are limitations in SQL Express
vs. the paid-for editions of SQL Server, the answer is, yes, there are
some limitations, but it is not all likely that you will suffer from
them.

First of all, the language is the same, so the SELECT statements that
runs in Enterprise Edition runs in SQL Express too. And there is no
difference in accuracy, and hardly in size of the statements either.
There is a difference in database size: with SQL Express, you cannot
have databases over 4GB in size.

The difference in performance lies in some special optimizer tweaks, like
considering using indexed view. But for the major bulk of queries,
query plans and performance are the same.

Quote:

Originally Posted by

3. If Access will perform poorly, can VFP be used instead with .net? I
already know it can't be used with ColdFusion. 4. If MS Express Advanced
will not sufficiently replace SQL, will MySQL do the job better?


Those questions are completely beyond the scope for this newsgroup,
and also beyond my knowledge.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Your answers are very helpful! Now a rather niave question: If I pay for a
site to host my application, does that mean I don't have to purchase the
server software and I only need the developer software?

"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns997668DB16155Yazorman@.127.0.0.1...

Quote:

Originally Posted by

(wipeout64@.hotmail.com) writes:

Quote:

Originally Posted by

>I'm planning to transport a desktop application to the web. A spin-off of
>this application has already been put on the web by another programmer.
>He
>used ColdFusion with MS SQL, Access, VC, and Java. It is faster than the
>desktop application (written in VFP).
>1. Can I get the same results using MS SQL Express Advanced and Access
>for
>the internet version if used with .net?


>
Probably. But you could also get worse performance. It's difficult to
answer, because it depends on how you do the implementation. DB engines
are extremely powerful tools to make things to really slow if you don't
do things right.
>

Quote:

Originally Posted by

>2. Are the select statements limited in power, accuracy, size, etc. for
>MS
>SQL Express Advanced when compared to SQL?


>
Compared to what? If you mean if there are limitations in SQL Express
vs. the paid-for editions of SQL Server, the answer is, yes, there are
some limitations, but it is not all likely that you will suffer from
them.
>
First of all, the language is the same, so the SELECT statements that
runs in Enterprise Edition runs in SQL Express too. And there is no
difference in accuracy, and hardly in size of the statements either.
There is a difference in database size: with SQL Express, you cannot
have databases over 4GB in size.
>
The difference in performance lies in some special optimizer tweaks, like
considering using indexed view. But for the major bulk of queries,
query plans and performance are the same.
>

Quote:

Originally Posted by

>3. If Access will perform poorly, can VFP be used instead with .net? I
>already know it can't be used with ColdFusion. 4. If MS Express Advanced
>will not sufficiently replace SQL, will MySQL do the job better?


>
Those questions are completely beyond the scope for this newsgroup,
and also beyond my knowledge.
>
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

|||(wipeout64@.hotmail.com) writes:

Quote:

Originally Posted by

Your answers are very helpful! Now a rather niave question: If I pay for a
site to host my application, does that mean I don't have to purchase the
server software and I only need the developer software?


Right. If you only use MS SQL Server to develop your application, but rely
on a web host to run it for you, you can get by with Developer Edition,
which is 50 USD. And, of course, if you are content with the features of
SQL Express, you can let it suffice with that for an even lower bargain.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx