Sunday, March 25, 2012
Accessing directly to a Full Index Catalog
Suppose that I have a Full Text catalog that indexes 3 tables. I want to search from an asp page for some text in the tables. How can I perform this search directly in the catalog ? Right now I must perform 3 queries, one for each table, but then I must
store the parcial results and in the end order by rank the retrieved results. This doesn′t seem to be a good solution. Does any one know if I can do this with the ixsso object (Query and Util)?. Any ideas ?
Thanks in advance.
Bart.
Bartolomeu,
Unfortunately, direct access to the FT Catalog files is not supported in SQL
Server 2000. However it has been reported publicly by Microsoft that it will
be supported via a command line utility in SQL Server 2005 (Yukon).
For SQL Server 2000, you must rely on using the FTS predicates of CONTAINS*
or FREETEXT*.
Regards,
John
"Bartolomeu" <Bartolomeu@.discussions.microsoft.com> wrote in message
news:90467F8E-3CFD-430A-A155-4BA09806F7CB@.microsoft.com...
> Hi,
> Suppose that I have a Full Text catalog that indexes 3 tables. I want to
search from an asp page for some text in the tables. How can I perform this
search directly in the catalog ? Right now I must perform 3 queries, one for
each table, but then I must store the parcial results and in the end order
by rank the retrieved results. This doesnt seem to be a good solution.
Does any one know if I can do this with the ixsso object (Query and Util)?.
Any ideas ?
> Thanks in advance.
> Bart.
accessing DB2 table from sql server and asp.net page
Hi ...
I have successfully installed Db2 client configuration tools in sql server and then created a link server to db2 server . I am correctly selecting IBM db2 provider through provider name dropdown in create link server dialog box (general tab) . However , I am unable to fill the data for 3 requirements ...1)product name (Is this db2 database name ?) 2) Data source (What is this ) 3)provider string ...(I tried various combinations ...But didn't succeed)(The msdn has given example of creating linked server like <code>
This example creates a linked server named DB2 that uses the Microsoft OLE DB Provider for DB2.
EXEC sp_addlinkedserver @.server='DB2', @.srvproduct='Microsoft OLE DB Provider for DB2', @.catalog='DB2', @.provider='DB2OLEDB', @.provstr='Initial Catalog=PUBS;Data Source=DB2;HostCCSID=1252;Network Address=XYZ;Network Port=50000;Package Collection=admin;Default Schema=admin;'
</code>
Then in Security tab I gave remote login and password
However I am unable to get tables view for the db2 database in sql server . It is showing errors like initialisation ....Provider DB2OLEDB etc... Can anyone pl help .
Is there any other way ?
Bhat
Rather thanNetwork Address=XYZ I believe you need to substitute an IP address for theXYZ.
|||Ya that's obvious ... I had given Ip Address of DB2 server ...|||Resolved ,
Courtesy...follwing link
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49610
Accessing DB from Webpages or Visual Studio
Ok,
I am a webdesigner who at the moment does not know SQL (although, I plan on remedying that) so I am developing a page with a DB designer - he is doing the DB work, I am doing the look/feel, but he asked me the following questions, of which I cannot seem to find an answer and the guys who tend our server are useless - so I am hoping someone here can help me. In general what he needs to know is:
"what is the external address (either in domain format or IP) and the equivalent internal address so that we can access the msSQL running on your server. The internal address is needed for the webpages to talk to it, while the external address is needed for development of the pages in visual studio and the database tools." Also, he later sent me an email asking that when I get this info (from someone) that it would be usefull to get a sample string/query to get access to the DB. I am running SQL 2000 and have enterprise manager. Where can I find this information? or how do I figure this out?
Thank you for all the help -- Please let me know if you need any more info.
Hey everybody,
I am a webdesigner who currently does not know SQL (although I am working on Remedying that) So as for my question, it comes from the gentleman who I am working with on a new site. What he needs to know is:
"what is the external address (either in domain format or IP) and the equivalent internal address so that we can access the msSQL running on your server. The internal address is needed for the webpages to talk to it, while the external address is needed for development of the pages in visual studio and the database tools."
We are running SQL 2000 with Enterprise manager. On an IIS server. He would also like to get a sample string {? = Query?} for a page accessing the DB.
Any help about where to find this information would be greatly appreciated. If you need to know anything else. Please let me know...
|||http://www.connectionstrings.com/?carrier=sqlserver2005|||There is no internal and external address. I am not quite sure what you mean by that. There is also no querystring in IIS to access the db, you will have to code that for yourself. You can use any coding language and a connectionstring from www.connectionstrings.com. Hars to tell what he wants to know with this information so far.Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
The 'internal' address will be the ServerName. The 'external' address will be the port and IP address -that assumes that your firewall allows that port to be open. (I suggest using something other than the default port of 1433 -choose a high number port to use.)
As Jens suggested, the web application should use the correct connectionstring. Hopefully, you will NOT allow something as reckless and dangerous as using a =?Query to pass connection information or sensitive data.
accessing data from a web page
I need to create a web application.
I will probably need to web pages in this application. On the first
page, I would like to query a Sql table and list the rows returned by the
query in a List.
When user will click on any of the listed rows and click on Edit, I
would like to display the second page which will allow the user to edit the
selected record and save it back into the Sql table.
I know, I can easily create this app using ASP.Net. But the problem is
that the web pages will need to be accessed locally from laptops. IIS will
not be available to serve the pages. Each laptop will have Sql server
installed locally. So my app probably would have to use only
HTML,javascript/vbscript. It can't use ASP/ASP.Net.
I will appreciate it if you can provide me suggestions or links to
tutorials/samples that can help me with this application.
Thanks.Nikhil Patel wrote:
> Hi all,
> I need to create a web application.
> I will probably need to web pages in this application. On the first
> page, I would like to query a Sql table and list the rows returned by
> the query in a List.
> When user will click on any of the listed rows and click on Edit, I
> would like to display the second page which will allow the user to
> edit the selected record and save it back into the Sql table.
> I know, I can easily create this app using ASP.Net. But the
> problem is that the web pages will need to be accessed locally from
> laptops. IIS will not be available to serve the pages. Each laptop
> will have Sql server installed locally. So my app probably would have
> to use only HTML,javascript/vbscript. It can't use ASP/ASP.Net.
> I will appreciate it if you can provide me suggestions or links to
> tutorials/samples that can help me with this application.
> Thanks.
How about writing a fat client app to do this, instead of a web app.
David Gugick
Imceda Software
www.imceda.com|||Nikhil,
If you can't use IIS, then it kills the idea of creating a web solution.
Do you have access to any other tools such as VB/.Net or VC++/.Net? Are the
local laptops on the same domain as the web server? If so, you could add a
header for the website in IIS and build/serve the pages as you normally woul
d.
"Nikhil Patel" wrote:
> Hi all,
> I need to create a web application.
> I will probably need to web pages in this application. On the first
> page, I would like to query a Sql table and list the rows returned by the
> query in a List.
> When user will click on any of the listed rows and click on Edit, I
> would like to display the second page which will allow the user to edit th
e
> selected record and save it back into the Sql table.
> I know, I can easily create this app using ASP.Net. But the problem is
> that the web pages will need to be accessed locally from laptops. IIS will
> not be available to serve the pages. Each laptop will have Sql server
> installed locally. So my app probably would have to use only
> HTML,javascript/vbscript. It can't use ASP/ASP.Net.
> I will appreciate it if you can provide me suggestions or links to
> tutorials/samples that can help me with this application.
> Thanks.
>
>|||Thanks. But this application has to be a web app. because it is inteded to
be used in a browser of a third party app.
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:eLjje1gCFHA.3928@.TK2MSFTNGP15.phx.gbl...
> Nikhil Patel wrote:
> How about writing a fat client app to do this, instead of a web app.
> --
> David Gugick
> Imceda Software
> www.imceda.com
Accessing Data Fields in Page Footer
Hi All,
How do I access data fields in page footer. Although Page Header and Page Footer can't contain data fields.
What is alternative or other other solution for the same?
It would really nice if somebody can help me out.
Thank you
Regards,
Palak Shah
Have an invisible textbox in your report and name it as textboxHidden and have any value in it from your dataset.
And in your footer or header, use the expression "ReportItems!textboxHidden.Value" to the value.
Shyam
|||I was trying in the same way but using directly textbox.value.
Thank you for letting know that we can access Report elements using ReportItems.
It was really helpful. You have really solved one of my important problems.
Can you also let me know which Book will be good for Studying.
Also can we calculate Cumulative Count using Runnning value function like it is in 2005 reporting services.
I have query reagding graph. Can we break graph if the scale is more than the certain range.
Thank you,
Regards,
Palak Shah
|||So, can you please mark my post as answer?
I dont know about any book, but you can always learn by visiting this forum and then using MSDN.
Can you please start a new thread for other issues, so we can discuss them there?
Shyam
Thursday, March 22, 2012
Accessing AS 2005 from ASP.NET application
I have an asp.net application. This application provide consolidated information to the user using Analysis Services 2005.
Within it, one aspx page uses MDX query to retrieve the information from the cube. However, we are unable to access AS 2005 because of authentication issues. What would be the easier to implement and deploy scenario?
How can I access AS 2005 from an ASP.NET application? Is there any feature to use?
Accessing analysis services from asp.net application
I have an asp.net application. This application provide consolidated information to the user using Analysis Services 2005.
Within it, one aspx page uses MDX query to retrieve the information from the cube. However, we are unable to access AS 2005 because of authentication issues. What would be the easier to implement and deploy scenario?
1) Using kerberos
2) creating a webservice with some Identity to access AS 2005 and using an agent in the application;
3) some other mechanism.
Has AS 2005 come up with some mechanism to allow easy access from web applications (just like sql server authentication in SQL 2005). Is there any feature that we could use? What about anonymous access?
The closest thing we have with AS and sql logins, is http access. Using http access you can set a uid and pwd on the connect string and then the system will use those to authenitcate you against IIS (where the AS server is). This allows your ASP.NET application to use a canned account to access AS. See the connection string parameters allowed on ADOMD.NET (which is what you should be using as a managed provider for your ASP.NET application).
_-_-_ Dave
|||And how do you implement AS role-based security in this scenario?If you use a canned account to access AS, you cannot match you users with an AS role.
Am I missing something ?|||You didn't say that you wanted to use role-based security, so I gave you a general answer. There are two issues here:
1) getting basic connectivity. If the IIS / ASP.NET machine is in a common domain then you can connect using normal NT authentication (run the virtual directory anonymously and do your own authentication within the application) -- have the anonymouse user for the vd to be a common domain account with the AS server and ensure that it is an Analysis Services sysadmin. If not in a common domain, then use http connectivity and specify an NT UID/PWD which is an AS sysadmin.
2) Once you are connected as an AS sysadmin, then you can use the new EFFECTIVEUSERNAME to set the appropriate username for the connection. Then BINGO there you are.
Hope that helps.
_-_-_ Dave
Monday, March 19, 2012
Access Violation What does it mean?
SQLServer2000 SP3 via SPs had an access violation the other day when two
users were simultaneously looking at the precisely the same information on
the same customer (one was training the other using two machines and going
through each step synchronously) and I received the Access violation error
(below). This has not happened before in two years (but no one probably
every came close to simulaneous use) and these two folks were the ONLY ones
who were even using the db and what they attempted to do (a data view) works
fine after this happened. There is nothing in the SQL Server error log about
this or are there any .dmp files in LOG. I saw an old FIX re: Access
violation during SSL but I'm at SP3 already, although this clearly wasn't an
exception error.
After Googling the web, I'm not even sure what "access violation" means,
although it sounds like it has nothing to do with my T-SQL code and is more
serious.
So, what does this mean?
Thanks.
Source: Microsoft OLE DB Provider for SQL Server
Error Number: -2147217900
Description: Syntax error or access violationAn AV is generally a bug in SQL Server... Look for the error message on MS
web site (using the long number that comes with the AV), and/or open a call
to MS... IF you are identifying a bug there will be no service charge.
"Don Miller" <nospam@.nospam.com> wrote in message
news:efbjxkyQDHA.2832@.TK2MSFTNGP10.phx.gbl...
> My web app (with SSL for every page) that uses VBCOM+ components to access
> SQLServer2000 SP3 via SPs had an access violation the other day when two
> users were simultaneously looking at the precisely the same information on
> the same customer (one was training the other using two machines and going
> through each step synchronously) and I received the Access violation error
> (below). This has not happened before in two years (but no one probably
> every came close to simulaneous use) and these two folks were the ONLY
ones
> who were even using the db and what they attempted to do (a data view)
works
> fine after this happened. There is nothing in the SQL Server error log
about
> this or are there any .dmp files in LOG. I saw an old FIX re: Access
> violation during SSL but I'm at SP3 already, although this clearly wasn't
an
> exception error.
> After Googling the web, I'm not even sure what "access violation" means,
> although it sounds like it has nothing to do with my T-SQL code and is
more
> serious.
> So, what does this mean?
> Thanks.
> Source: Microsoft OLE DB Provider for SQL Server
> Error Number: -2147217900
> Description: Syntax error or access violation
>
>
Thursday, March 8, 2012
Access to sql server
thanks!With the Access Database you are probably using OleDbDataAdapters and OleDbCommands. With SqlServer you should use SqlDataAdapters and SqlCommands because they are more efficient. The syntax between the two is very similar so mostly you'll just need to change the class names (OleDbxxx to Sqlxxx).
If you're using any Access specific Sql commands you will have to modify them for SqlServer. For example Access uses "IIF(x,y,z)" while Sql Server uses "CASE WHEN x THEN y ELSE z END".
Friday, February 24, 2012
access problem
Hi,
The Report Server and the server hosting web application are differrent. I have an aspx page with the reportviewer control. If I try to open the page with the report control its giving me a message
privilages for the user 'domain/server$' are insufficient for performing this operation". where the 'server$' is the IIS server hosting webapplication.
Please help me in solving this
put Domain Administrator as a full user with all access permissions on the report server (Actually in the properties of the report)Thursday, February 16, 2012
Access Locking problem
I've been working on this problem for days and cannot seem to figure it out. I'm using the Microsoft Access Driver in an ASP web page to try to update a database. I'm using adLockPessimistic, but it is acting like I'm using adLockOptimistic.
Before you ask, I'm using MDAC 2.8 SP2 on my Windows 2003 Server.
If I open two web pages at the same time, both trying to increment a counter in a database 100 times, the end result should be a value of 200. But in most trials, I get a number less than 200, like 187. It almost seems like it is not locked at all, ecept for the fact that I sometimes get an error telling me I can't update the data because it is locked by another user.
So... I can read OK, but not save because sometimes its locked by another user and sometimes the increment doesn't really increment, therefore it seems like I have adLockOptimistic instead of adLockPessimistic. I do get adLockPessimistic when I read back the lock type.
Any help would be great!
Code Snippet
for i = 1 to 100
if ( len(Request.Form("zipcode")) > 0 ) then
call LogImpression (38)
end if
next
Function LogImpression (CampID)
'This increments the impression counter for a campaign in the vendors database
On Error Resume Next
Set adoCon = Server.CreateObject("ADODB.Connection")
'adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("accessdb/vendors.mdb")
adoCon.Open "DSN=vendorDB"
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT vendors.impressions,vendors.ID FROM vendors WHERE ID=" & CampID & ";"
rsAddComments.CursorType = 2
rsAddComments.LockType = 2
rsAddComments.CursorLocation = 2
rsAddComments.Open strSQL, adoCon, 2, 2, adCmdTableDirect
if (NOT rsAddComments.EOF) then
Err.Clear
MyCount=CInt(rsAddComments.Fields("impressions")) + 1
rsAddComments.Fields("impressions") = MyCount
rsAddComments.Update
if Err.Number <> 0 then
'we had an error, row was locked
Err.Clear
MyCount=CInt(rsAddComments.Fields("impressions")) + 1
rsAddComments.Fields("impressions") = MyCount
rsAddComments.Update
end if
end if
rsAddComments.Close
Set rsAddComments = Nothing
Set adoCon = Nothing
end function
Thanks, Lee
Your code itself doesn't lock this critical section. You cannot consider these two statements to be atomic. You have two database operations going on, and you are trying to run them atomically, so your code needs to lock around that area or you need to wrap the commands in transactions.
Here is the scenario you have right now:
Assume that the database starts with "impressions" set to 1:
process A updates MyCount = impressions + 1 = 2 then context switches out
process B updates MyCount = impressions + 1 = 2 then context switches out
process A sets impressions = MyCount = 2 then context switches out
process B sets impressions = MyCount = 2 then context switches out
These concurrency issues do not happen all the time, and are hard to reproduce, but this is clearly an application level concurrency issue.
I suggest wrapping those two lines in a critical section to enforce serialization there.
Hope that helps,
John
Thursday, February 9, 2012
Access denied thru ole db but not DSN
Now I get the below error msg. It only happens on my asp
page. I can run through access or vb and it connects fine.
It also works fine through a dsn. I have looked everywhere
to no avail. it is sql 2k sp 3.
any help is mucho appreciated
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNMPNTW]Access denied.
/macro/conn_test.asp, line 20
code:
<%
dim lca, sql, region
set lca = server.createobject
("adodb.connection")
lca.connectionstring
= " Provider=SQLoLEDB;Server=231v9;UID=LCAP;
Pwd=fxtool;Datab
ase=LCAOPS"
lca.connectiontimeout = 30
lca.Open
lca.close
%>Have you checked permissions on the registry keys? You could use regmon
from sysinternals.com to see what keys it accesses and see if it gets any
access denied messages.
Or maybe it can't find (or doesn't have security to see) the actual OLE DB
driver?
Will a UDL on the IIS machine, using that same driver and connection info,
connect to the SQL Server?
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.|||This connection that is failing is using named pipes. Try adding this to
the connect string,
Network Library = dbmssocn. this will force it to use tcp/ip.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I am having the same problem Kevin is.
when I try to connect to my SQL Server (it is on a separate box from my
development workstation) through a simple windows application it works fine.
When I use the exact same code in an .aspx file, I get SQL Server does not
exist or access is denied.
I tried adding Network Library=dbmssocn, but when I did, even the windows
app stopped working.
Any suggetions would be appretiated.
thank you
Kirk Graves
"Rand Boyd [MSFT]" <rboyd@.onlinemicrosoft.com> wrote in message
news:fQ93b$d5DHA.2768@.cpmsftngxa07.phx.gbl...
> This connection that is failing is using named pipes. Try adding this to
> the connect string,
> Network Library = dbmssocn. this will force it to use tcp/ip.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.
>
Access denied error with reporting service (ReportViewer)
I have a web page that has ReportViewer control in it. I load a report to it and it comes there nice and everything is ok. In report I have a link that opens another web page from the same web site where the original page is located (lets say that the original is in http//MySite and the page opened from the link is in MySite/Dialogs/MyDialog.aspx). The new page is opened with javascript function window.open(...) This new page contains reportviewer control, too and it's populated by the parameters given in the link url.
When I open the dialog page in the computer that has the web page and the report server on the same computer everything runs smoothly. But when I try to use the application from another computer it doesn't work right. The main page and the report opens to the browser in a proper way but when I click to the link that should open the dialog new browser window is opened but the reportviewer gives http 401 access denied error with ServerReport.SetProperties method.
I have set impersonate=true to the web config and I'm administrator in both computers that are used. What's the problem here? In another evironment it works nicely, but when the web site is used from another computer it gets broken...
Does ur report server have any credentials that u need to pass?
|||What credentials should you have? I'm using windows authentication in my web page (set in web.config). Does the report server has a user account that should be set to the control?
|||Suppose if i am trying to access my sql server data base from a different computer, windows authentication wont let me get into it... u will need a Username and password.. like sa or something like...
So i think u would need the same thing for report server... if i specify local host and the reports are hosted on ur computer i dont need any username or password to get in to the report server .. Suppose if u want to access it from a different computer and then give local host ... its gonna look in the local server and naturally not let u in to the report server...
regards,
Karen
|||The link url doesn't point to localhost. It has the name of the computer where the report server is running (like http//MyAnotherComputer/ReportPage/ReportDialog.aspx). So I'm not pointing to localserver at any time. Even in the environment where the the application is working I use the name of the computer in the link url.
then instead of the machine name ... try giving the ipaddress of that machine and one more when u try to access... http:/ServerName/Reports... does it prompt you for a username and password to get into it and view the reports?
|||Why would it make any difference to set ip address instead of computer name? The computers are both in the sam domain so there shouldn't be any problem with that. I gotta try the second test first time when I get back to my development computer. I'll let you know the result then.|||Why would it make any difference to set ip address instead of computer name? The computers are both in the same domain so there shouldn't be any problem with that. I gotta try the second test (accessing reports from another computer) first time when I get back to my development computer. I'll let you know the result then.|||Ok, I tried to access the report server with a browser on another computer (the url used washttp://computer_name/Reports) and worked just fine. Could it be possible that when I open another window from a report using a link, that the gredentials don't follow to the second window? If this is a case, what user account information should be forwarded to the dialog window? Should I use Web Service identity that is set for the Report Server? If I have set impersonate true in web.config, how does it affect to the behaviour of the control?|||I got this fixed! It seems that the application made a double hop. I made a mistake and called a report server on another computer instead of the one that was running on the web server.