Microsoft OLE DB Provider For IBM DB2 Does Not Accept Common Table Expressions

Oct 26, 2007



After reading all the comments about microsoft ole db provider for db2, I've started converting a project from ibm db2 provider to microsoft ole db provider, for the reason that the server would not need a ibm client software installation anylonger.
However in one of the dataflows there is a select statement on the DB2 database (AS400 iseries DB2 V5R4) that uses common table expression. The Oledb data source in the Dataflow returns zero input columns when I use the microsoft provider instead of the ibm provider. When I set it back to use the ibm oledb provider the input columns are available again.
The common table expression is used in the select statement like:
WITH x AS (SELECT ... FROM mytable WHERE ...)
SELECT x.*, (x.a - x.b) As diff
FROM x

We are not allowed to change anything in the DB2 database, so using views or sprocs is not an option.

Did anyone else experience this and can it be avoided without changing the selct logic?

View 3 Replies


ADVERTISEMENT

Common Table Expressions

Aug 31, 2006

Hi guys,

I know its not a good idea to give you a big query...but/...

I have a query (given below) with Common table expressions. It is giving me error : The multi-part identifier "dbo.tmpValidServices_ALL.Service" could not be bound. for all the fields .. Do you have any idea.. I fed up with analysing query.. made me mad.. please help me...

 

----------------------------------------------

DECLARE @sql nvarchar(MAX), @paramlist nvarchar(4000)

SET @sql = 'WITH Q1 (SiteID,Programme,Complete,PID,COC,NotionalSum,TVMinsSUM,Postcode,Suburb,Qty)
AS

(SELECT
 dbo.tmpValidServices_ALL.SiteID,
 dbo.tmpValidServices_ALL.Programme,
 dbo.tmpValidServices_ALL.Complete AS Complete,
 dbo.tmpValidServices_ALL.RID AS PID,
 dbo.tmpValidServices_ALL.COC# AS COC,
 (dbo.lkpService.Notional$) AS NotionalSum,
 (TVMins) AS TVMinsSUM,
 dbo.tmpDemographics_ALL.Postcode,
 dbo.tmpdemographics_ALL.Suburb,
                count(*) as Qty

FROM  lkpService

INNER JOIN dbo.tmpValidServices_ALL vs  ON dbo.lkpservice.code = dbo.tmpValidServices_ALL.Service
INNER JOIN dbo.tmpDemographics_ALL ON dbo.tmpValidServices_ALL.RID = dbo.tmpDemographics_ALL.RID '

IF @COCGroup IS NOT NULL
SELECT     @sql = @sql + 'LEFT OUTER JOIN dbo.lkpCOC c ON dbo.tmpValidServices_ALL.COC = c.pvcode '

SELECT     @sql = @sql + 'LEFT OUTER JOIN dbo.lkpAgency ag ON vs.SiteID = ag.EXACT# '      

SELECT     @sql = @sql + 'WHERE dbo.lkpService.Schedule = @Schedule '

 IF @StartDate IS NOT NULL
     SELECT     @sql = @sql + ' AND (dbo.tmpValidServices_ALL.Complete  >= @StartDate ) '

 IF @EndDate IS NOT NULL
      SELECT     @sql = @sql + ' AND (dbo.tmpValidServices_ALL.Complete <= @EndDate ) '


 IF @SiteID IS NOT NULL
       SELECT     @sql = @sql + 'AND (ag.EXACT# = @SiteID) '

 IF @COCGroup IS NOT NULL
 SELECT     @sql = @sql + ' AND (c.pvcode = @COCGroup OR c.pvcode IN (SELECT COC FROM lkpCOCGroup WHERE COCGroup = @COCGroup)) '

 IF @Provider IS NOT NULL
 SELECT     @sql = @sql + 'AND (dbo.tmpValidServices_ALL.Provider = @Provider) '

 IF @Postcode IS NOT NULL
SELECT     @sql = @sql + 'AND (dbo.tmpdemographics_ALL.Postcode = @Postcode) '

SELECT     @sql = @sql  + ' GROUP BY dbo.tmpValidServices_ALL.SiteID,
                                                              dbo.tmpValidServices_ALL.Programme,
                                                              dbo.tmpValidServices_ALL.Complete ,
                                                              dbo.tmpValidServices_ALL.RID , 
                                                              dbo.tmpValidServices_ALL.COC# ,
                                                              dbo.tmpDemographics_ALL.postcode, 
                                                              dbo.tmpdemographics_ALL.Suburb,
                                                              (dbo.lkpService.Notional$),
                                                              (dbo.lkpService.TVMins)  ) 

SELECT COUNT(DISTINCT PID + CAST(Complete AS varchar(20))  + CAST(COC AS varchar(20)) + CAST(SiteID AS varchar(20)) + CAST(Programme AS varchar(20))) AS Visits,
 COUNT(DISTINCT PID + CAST(SiteID AS varchar(20)) + CAST(Programme AS varchar(20))) AS Patients, 
 COUNT(DISTINCT  CAST(COC AS varchar(20)) + CAST(SiteID AS varchar(20)) + CAST(Programme AS varchar(20)) + CAST(PID AS varchar(20))) AS COCs,
 SUM(NotionalSum) AS NotionalSum,
 SUM(TVMinsSUM) AS TVMinsSUM,Postcode,Suburb,sum(Qty) as Qty
 
FROM Q1

Group by Postcode,Suburb

Order by Postcode,Suburb  '

SET              @paramlist = '@SiteID as numeric,
@COCGroup as varchar(20),
@Postcode as varchar(20),
@StartDate DateTime,
@EndDate DateTime,
@Schedule varchar(20),
@Provider varchar(20)'
                     
 EXEC sp_executesql @sql, @paramlist, @SiteID, @COCGroup, @Postcode, @StartDate, @EndDate, @Schedule, @Provider

View 2 Replies View Related

Distinct In Common Table Expressions CTE

Feb 20, 2007

I have managed to write my first CTE SQL that handles recursion but I have a problem with distinct - can't get that to work!!
My CTE:WITH StudentsHierarchy(SystemID1, GroupID, AccessType, AccessGroupID, StudentID, HierarchyLevel) AS
(
--Base Case
SELECT
SystemID,
GroupID,
AccessType,
AccessGroupID,
StudentID,
1 as HierarchyLevel
FROM UserGroup a

UNION ALL

--Recursive step
SELECT
u.SystemID,
u.GroupID,
u.AccessType,
u.AccessGroupID,
u.StudentID,
uh.HierarchyLevel + 1 as HierarchyLevel
FROM UserGroup u
INNER JOIN StudentsHierarchy uh ON
u.GroupID = uh.AccessGroupID

)
Select sh.SystemID1, sh.GroupID, sh.AccessType, sh.AccessGroupID, sh.StudentID, sh.HierarchyLevel, (select StudentName from Student s
where sh.StudentID = s.StudentID) AS StudentName from StudentsHierarchy sh
WHERE AccessType = 'S'
 
and I would like to have a distinct on the StudentID like:Select DISTINCT sh.StudentID, sh.SystemID1, sh.GroupID, sh.AccessType, sh.AccessGroupID, sh.StudentID, sh.HierarchyLevel, (select StudentName from Student s
where sh.StudentID = s.StudentID) AS StudentName from StudentsHierarchy sh
WHERE AccessType = 'S'
 
 
How should I do?
 

View 1 Replies View Related

Is It Possible To Execute The T-Sql Code Of Common Table Expressions In VB 2005 Express?

Jan 2, 2008

Hi all,
I have the following T-SQL code of Common Table Express (CTE) that works in the SQL Server Management Studio Express (SSMSE):

--CTE.sql--

USE ChemAveRpd

GO

WITH PivotedLabTests AS

(

SELECT LT.AnalyteName, LT.Unit,

Prim = MIN(CASE S.SampleType WHEN 'Primary' THEN LT.Result END),

Dupl = MIN(CASE S.SampleType WHEN 'Duplicate' THEN LT.Result END),

QA = MIN(CASE S.SampleType WHEN 'QA' THEN LT.Result END)

FROM LabTests LT

JOIN Samples S ON LT.SampleID = S.SampleID

GROUP BY LT.AnalyteName, LT.Unit

)

SELECT AnalyteName, Unit, avg1 = (abs(Prim + Dupl)) / 2,

avg2 = (abs(Prim + QA)) / 2,

avg3 = (abs(Dupl + QA)) / 2,

RPD1 = (abs(Prim - Dupl) / abs(Prim + Dupl)) * 2,

RPD2 = (abs(Prim - QA) / abs(Prim + QA)) * 2,

RPD3 = (abs(Dupl - QA) / abs(Dupl + QA)) * 2

FROM PivotedLabTests

GO

===========================================
How can I execute this set of the CTE.sql code in the VB 2005 Express via the Stored Procedure programming?

Please help and respond.

Thanks in advance,
Scott Chang

View 1 Replies View Related

Common Table Expressions With Table Creation

May 20, 2008

I have multiple Common Table Expressions i.e CTE1,CTE2,...CTE5.

I want to Create Temperory Table and inserting data from CTE5. Is this possible to create?

like:


create table #temp (row_no int identity (1,1),time datetime, action varchar(5))

insert into #temp select * from cte5

View 4 Replies View Related

SQL 2005 Standard Won't Accept Connections - All Common/FAQ Remedies Have No Effect

Sep 24, 2006

Hi,

SQL
Server 2005 isn't accepting any connection other than SQL Management
Studio from the local machine. However, even that's exhibiting strange
behavior (please see below for more details).

I've read
through all the common errors regarding enabling remote connections via
the SAC tool, making sure protocols are enabled, etc. This case seems
to be completely outside. Any advice appreciated.

Thanks,

Elias


[1] Client side:
What
is the connection string in you app or DSN? N/A. Can't connect via any
remote method, including client Control Panel > ODBC > create
DSN, SQL Server Enterprise Manager, third party application.
If
client fails to connect, what is the client error messages? Several,
depending on method: "server does not exist or access denied", "error
has occurred... under default settings, SQL Server does not accept
remote connections", etc.
Is the client remote or local to the SQL server machine? Remote
Can you ping your server? YesCan
you telnet to your SQL Server? No. However, there's a functional
instance of SQL Server 2000 on the same domain which has no problems- telnet also fails to that instance, even locally from either machine using the 127.0.0.1 address. Telnet functions for other ports.
What
is your client database provider? N/A Or/And, what is your client
application? SQL Management Studio and others
Is your client computer in the same domain as the Server computer? Same domain
What protocol the client enabled? TCPIP when I attempted to create the DSN. Not sure what protocol SQL Management Studio uses.
Do
you have aliases configured that match the server name portion of your
connection string? NoDo you select force encryption on server and/or client? No


[2] Server side:

What is the MS SQL version? SQL Server 2005
What is the SKU of MS SQL? Standard
What
is the SQL Server Protocol enabled? [Shared Memory | TCPIP | Named
Pipes ] Have tried all three individually and together. Configuration Manager exhibits strange behavior (see below)Does
the server start successfully? Server starts successfully when the
machine boots. However once it's stopped, it can't be restarted (see
below)
If SQL Server is a named instance, is the SQL browser enabled? Default instance
What is the account that the SQL Server is running under? Local SystemDo
you make firewall exception for your SQL server TCP port if you want
connect remotely through TCP provider? Not sure, but SQL Server 200 instance is working OK
Do
you make firewall exception for SQL Browser UDP port 1434? Unknown


[3] Platform:
What is the OS version? Client: Windows XPSP2 Server: Windows Server 2003
Do you have third party antivirus, anti-spareware software installed? Client: Trend Micro Server: UnknownOther behavior:

A separate instance of SQL Server 2000 on a different machine on the same domain is functioning without problems.

Telnet
to either SQL Server (functional 2000 or problem 2005) on port 1433 is
not possible - even when attempted from the local machine using
127.0.0.1! Telnet to both machines works using other ports.

When
creating a DSN from a client machine, problem 2005 instance is in list
of available SQL Servers, however connection fails ("SQL Server denied
access or does not exist").

MSSQLSERVER service starts
automatically on boot. However, once stopped the service can not be
restarted. Message given: "SQL Server (MSSQLSERVER) service on Local
Computer Started and then Stopped. Some services stop automatically if
they have no work to do, for example, the Performance Logs and Alerts
Service."

SQL
Server Surface Area Configuration for Services and Connections tool
does not display Database Engine option as indicated by this MS guide
to enabling remote connections:
http://support.microsoft.com/default.aspx?scid=kb;en-us;914277

SQL
Server communication manager shows TCP, Shared memory, named pipes
enabled. However event log seems to show instance not listening via any
protocol. Message displayed as: "SQL Server listening on ." (should
read: "Server is listening on ['any' <ipaddress> <ipv4>
<Port Number>])

Several answers indicated uninstall and reinstall could solve these problems. However, wizard refused to uninstall SQL Server.

Attempted disabling Shared Memory as documentation indicates this protocol gets used first. No luck.

Access through SQL Server Management Studio works, from local machine only.

Able to ping machine by name and IP.

View 1 Replies View Related

Syntax Of Operators And Common Functions In Expressions

Apr 4, 2008

Hi all, real basic question:
I can't seem to find a basic reference that tells me the syntax and allowable values of parameters in common functions such as Format or CDate when editing a Field Expression in Visual Studio (Report Definition Language?). Where would I start?

For example, I've discovered that the Format function "Returns a string formatted according to instructions contained in a format String expression.", and the string expression can have values like "D" and "d" which produce different results, but where would I find out what the allowable string expressions are and their meaning?

I have also been guessing at the syntax of the CDate command with no luck. I need a reference that tells me what the different function parameters mean.

thanks
Jac

View 1 Replies View Related

Microsoft OLE DB Provider For DB2

Feb 13, 2008

Is this included with SQL Server 2005? If so; how do I go about setting this up? Thanks in advance!!

View 1 Replies View Related

Microsoft OLE DB Provider For DB2

Nov 7, 2005

The Microsoft OLE DB Provider for DB2 can be downloaded as a part of the SQL Server 2005 Feature Pack located at:

View 19 Replies View Related

How To Use The Microsoft OLE DB Provider For DB2.

Jan 26, 2007

I follow the steps:

1.In configure OLE DB Connection Manager dialog, I click New.

2.In Connection Manager dialog ,I choose Native OLE DBMicrosoft OLE DB Provider for DB2.

3.In Connection Manager dialog I click the "Data Links" button. Now I am on "Data link property" dialog. 

4.On connection tab, I enter fmdb for data source, which is my remote database name. On Network section I choose TCP/IP Connection and set the right IP/Port. Uncheck Single sign-on and enter the user and password. Then comes the Database section. Database name fmdb for Initial catalog,"fmdbrun" for Default Schema, then what is Package Collection?(My db2 database is in a AIX/RS 6000 box).

5.On advanced tab, I choose DB2/6000 for DBMS platform, ISO 8859-1 Latin-1(28591) for Host CCSID, and ANSI/OEM Simplified Chinese GBK(936) for PC Code page, then what's Default qualifer, I eft blank.

6. Then I switch back to "connection" tab, if I left "Package collection" blank and click "Test Connection" button,I got "Test connection failed because of an error in initializing the provider.- invalid parameter". If I use FMDBRUN(the default schema) for "Package collection" and click "Test Connection", I got "Test connection failed because of an error in initializing the provider. - The network connection was terminated because the host failed to send any data. SQLSTATE:08S01,SQLCODE:-605".

 

Anybody knows what's wrong.

View 24 Replies View Related

How To Connect ADODB With Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider For Microsoft SQL Server Compact 3.5)

Sep 12, 2007

Hi
We are checking VB 9 (Orcas).

we connected to database created under with sql server 7. with this code

Public cn As New ADODB.Connection

Public Sub OpenDB()


cn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial catalog=Reservation;Data Source=.")

End Sub
this code worked well.
we know sql7 is not compatiable with vista. please tell us how to connect it wiith sql2005 . we downloaded orcas express edition beta. we created a database also. please let u know how to connect with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5).

Rgds
Pramod

View 7 Replies View Related

Microsoft OLE DB Provider For Oracle

Oct 26, 2000

Hi,

I issued the following set of statements against an Oracle 8.0.6 table linked to Microsoft SQL Server 7.0 (SP2):

BEGIN TRANSACTION
DELETE FROM ORACLE_DATABASE..SCHEMA1.TABLE1 WHERE COLUMN2=123.45
ROLLBACK TRANSACTION

and received the following message:

Server: Msg 7391, Level 16, State 1, Line 1
The operation could not be performed because the OLE DB provider 'MSDAORA' does not support distributed transactions.

I searched BOL and found this sentence:

To perform distributed transactions between SQL Server and Oracle, you must use Oracle version 8.0.4.1 or later.

What am I missing? Is there a higher version of Microsoft OLE DB Provider for Oracle that supports distributed transactions (we are using the one that comes with Microsoft SQL Server 7.0 installation)?

Maja

View 2 Replies View Related

Microsoft OLE DB Provider For DB2 (DB2OLEDB.DLL)

Mar 10, 2000

Anyone knows where I can find and install the above driver.
Trying to use Link Server from SQL 7.0 to access AS400 database using OLE DB option.
Urgent matter... Help!!!!

Have already tried to find and install this driver using SNA Client Software with out any success. SQL 7 does not come with this OLE DB drivers. Any idea where I can get it.

Thank you in advance....

View 1 Replies View Related

Microsoft Ole Db Provider For Odbc Drivers

Oct 18, 2007

I'm not able to see microsoft ole db provider for odbc drivers on sql server 2005. Anyone know which driver I should install to see it?
I'm trying to create a linked server from as400 to SS2K5.




http://www.sqlserverstudy.com

View 2 Replies View Related

Cannot Connect Using ADO With Excel Microsoft Jet Provider 4.0

Feb 15, 2007

Hi:

I have a vb 6 app that exports data from sql to excel. The user has the ability to select either local or server. When they select server, the connection string is modified to include the server name instead of the local msde instance to look like this:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I'm using Microsoft Jet Provider 4.0 and OpenDataSource.

SELECT * INTO TempXL FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C: estxltest.xls;Extended Properties=Excel 8.0')...[Sheet1$]

This code works fine when user is accessing msde on local, but when using above DSN, I receive the following message:

"2147217900 - OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEdB.4.0' IDBInitialize:: Initialize returned 0x800040005: The provider did not give any information about the error.]

When I trace the connection, these error messages occur:

Failed to set proper user name ('NT AUTHORITYSYSTEM') for the connection

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot alter table 'TblXMyTable' because this table does not exist in database 'master'. (State 42S02) (Code 4902)

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'TblxMytable'. (State 42S02) (Code 208)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error. (State 42000) (Code 7399)

[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]. (State 01000) (Code 7300)

I am especially puzzled by the second message because I am specifying the database name in my connection string as:

"provider=sqloledb;data source=MyServer;initial catalog=MyDatabase;user id=UserX;password=PasswordX;database=MyDatabase"

I can read from the server copy and copy to Excel, but I cannot write back to SQL. Can someone please tell me what I'm doing wrong?

Thanks in advance for any help.,

















View 1 Replies View Related

Web Service Task With An Provider Different From Microsoft

Dec 5, 2007



Hello,

I have a web service contained in a apache tomcat server and I try to execute a webservice and store the result into a flat file.But I have a message saying me that there is an error in the xml document.
I suppose that it's my wsdl file.
But my wsdl file is fine!!!
Can the error come from the provider of the web service (Apache Tomcat).
I suppose that because in every example on the internet I didn't see an example an tomcat or other web server use.

View 1 Replies View Related

Microsoft OLE DB Provider For DB2 In SSIS Vs. ODBC In DTS

Jun 12, 2007

I finally made data transfer between AS400 and SQL2005 work by using Microsoft OLE DB provider for DB2. I have tried other methods, some do not have build-in destination, some have unicode conversion problem. The only issue I have with this method is the peformance. For example, 300,000 rows load from AS400 take only 3 minutes with the ODBC connection in DTS, but more than 5 minutes with the microsoft OLD DB provider for DB2 in SSIS.



Does anyone have the same issue or figured out any tweaking that may speed up the transfer?



Thanks.

View 20 Replies View Related

The OLE DB Provider Microsoft.Jet.OLEDB.4.0 Has Not Been Registered

Feb 13, 2007

Hi All,

I am getting the below error while executing the opendatasource statement

SELECT ParamName, ParamDate,ParamNumber,ParamChar

FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',

'Data Source= c: estcmdmiscCSTARIntegrationParameters.xls;Extended properties=Excel 8.0')...[CSTARIntegrationParameters$]

Error :

The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered

Enviromnet :

Windows 2003 64 bit with SP1 and sql 2005 installed.

Same code is executing fine in my local machine which is XP 32 bit.

Can some one help me in resolving this issue.

Also when I tried to check the providers by expanding the linked servers node in the SQL server management studio . i couldnt found the provider for jet.



Regards,









View 46 Replies View Related

Microsoft OLE DB Provider For Visual FoxPro 9.0

Feb 27, 2007

Im quite interested to see if any one is using Microsoft OLE DB Provider for Visual FoxPro 9.0 in an SSIS package. Is it possible to use this for free table directory like you can with the ODBC driver. ????

thanks kindly



My basic proccess is as follows: The source foxpro database has hundreds of dbf files ---the SSIS procress is as follows

1: Copy only required dbf files and/or matching .fpt files over to local drive on SSIS box(we only need 10 files)

use MS Visual Foxpro ODBC driver (free table option) and set up a system DSN--dataflow tab---datareader source--and away you go

View 1 Replies View Related

Microsoft OLEDB Provider Oracle

Nov 23, 2006

Hi,

Previously i was using oracle8i with ssis.ssis was working fine.later i have upgraded 8i to oracle 9i.now when ever i try to establish a new connection using Microsoft OLEDB Provider for Oracle.i am getting the following error "Oracle error occurred, but error message could not be retrieved from Oracle" .but i am able to access the oracle 9i database thru pl/sql and toad. what could be the problem?

Thanks

Jegan.T

View 2 Replies View Related

Error :(provider: Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server) (Microsoft SQL Server, Error: 53)

Mar 1, 2007

Hi,

I am trying to connect to my SQL Server 2005 but it gave me following error message.




TITLE: Connect to Server
------------------------------

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)



So, Please help me to solve this problem.



tnks.

View 20 Replies View Related

Microsoft OLE DB Provider For SQL Server Error '80004005'

Mar 2, 2004

Hi friends,

Can anyone help me in connecting sql server and asp.
Wheneever try to do the connection, I am getting following error. All the connection string which i am using are correct.

can you help me.

Following are the error line

----------------------------------------------------------------

Microsoft OLE DB Provider for SQL Server error '80004005'

Invalid connection string attribute

/MAsteringASP/global.asa, line 17

Microsoft OLE DB Provider for SQL Server error '80004005'

Invalid connection string attribute

/MAsteringASP/test2.asp, line 21
------------------------------------------------------

Please ckeck my code which I am using for connection


Thank you

Graceson MAthew

----------------------------------------------------------------
<%@ Language =VBScript %>
<% option explicit %>

<Html>
<head>
<title> Database Connection </title>
</head>
<body>
<%

<!-- #INCLUDE FILE="adovbs.inc" -->

dim conn
dim sql
dim r
dim aConnectionString

Set conn=Server.CreateObject("ADODB.Connection")

conn.Mode=adModeReadWrite
conn.Open="Provider=SQLOLEDB;UID=Administrator;Password=passw d;Initial Catalog=nrth;Datasource=server ip;Port Number= 80"


Response.Write (" Database Connectivity")

%>
</body>
</html>

View 10 Replies View Related

Microsoft OLEDB Provider Error (with SQL Server And ASP)

Mar 8, 2004

Dear all,

Still i am having problem with connecting sql server with ASP (Intranet).

Following is the code which i am using for the connection now,

Set conn=Server.CreateObject("ADODB.Connection")
conn.open "DSN=aspfirst;Uid=;PWD=;"


The error mesage , generated by this code is attached with this mail. Please check the attachment and hel me in the same


Graceson

View 2 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers Error '

May 21, 2007

Hi guys

I wanna display the compname [in competencies tbl], firstname & surname [in users tbl], position level [in positions tbl] and userlevel [in compuser tbl] but i get the ff error msg

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]The column prefix 'CompUser' does not match with a table name or alias name used in the query.

My code:

SELECT compname, firstname,surname ,level AS positionlevel
FROM positions, compuser, users A, comppos
INNER JOIN Competencies
ON comppos.Compid = competencies.Compid
RIGHT JOIN Users
ON CompUser.UserID = Users.UserID
WHERE Users.UserID = '999209'
OR Users.UserID = 'helpdesk1'
OR Users.UserID = '999339'
OR Users.UserID = 'helpdesk5'
ORDER BY CompName

Pls kindly help
Noks

View 1 Replies View Related

Ad Hoc Access To OLE DB Provider 'Microsoft.Jet.OLEDB.40' Has Been Denied.

Apr 17, 2007

Hi all,



I am currently working on a stored procedure in SQL 2000 where I use OPENROWSET function to read data from an Excel file into a temporary table.



It works fine when I logged in with username 'sa' and psswrd 'sa' but when I log in with another user name and password I get the following error:

"Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.40' has been denied.
You must access this provider through a linked server."



I am using VB 6.0 as front end. Is there anyway i can overcome this error?



Please help.



Dhiraj

View 7 Replies View Related

Microsoft OLE DB Provider For SQL Server Error '80040e37'

Oct 16, 2006

I get Microsoft OLE DB Provider for SQL Server error '80040e37'

Invalid object name '#t_testTemp484883646'.
when I run the following ASP code:

------------------------------------------------------------Code is below---------------------------------------------------------

<!---#Include File="../includes/adovbs.inc" -->

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>

<%
'----- Setup database connection
Set DataCmd = Server.CreateObject("ADODB.Connection")
Set rsData = Server.CreateObject("ADODB.RecordSet")
Dim varTempTableName

DataCmd.Open Application("DB")

'----- Use a Temp Table so that it gets destroyed automatically in case the page times out
'----- Use a Global Temp Table so that it is available across scopes when I open the record set below
'----- Append a semi unique number to the end because its global it could conflict with another browser running the same report

'varTempTableName = "##t_TestTemp" & Minute(Now()) & Second(Now())
varTempTableName = "#t_TestTemp" & Session.SessionID


strSQL = "Create Table " & varTempTableName & "(TestColumn2 int)"
DataCmd.Execute strSQL


strSQL = "select * from t_Test"
rsData.Open strSQL, DataCmd, adOpenForwardOnly,adLockReadOnly



Do While Not rsData.EOF
varTestColumn2 = rsData("TestColumn2")

'Error occurs when I place the following insert statement. Code works with the global variable

strSQL = "Insert into " & varTempTableName & " (TestColumn2) values (" & varTestColumn2 & ")"
DataCmd.Execute strSQL

rsData.MoveNext
Loop

rsData.Close

strSQL = "Drop Table " & varTempTableName
DataCmd.Execute strSQL


Set rsData = Nothing
Set DataCmd = Nothing
%>

</BODY>
</HTML>


View 1 Replies View Related

ODP.Net Vs. Microsoft Oracle Data Provider In SSRS

Oct 9, 2007



Which one is better to use? Is there a significant difference between the two?

Does someone have the directions to add ODP.Net to my database connections list in SSRS?

Thanks

View 1 Replies View Related

SQL 2012 :: How To Add A Table Constraint That Will Only Accept Values Y Or N

Oct 21, 2015

Create table enrollment_in
BEN_DENT VARCHAR(1)

What I need is a constraint to limit the values to Y or N

View 2 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers Error &#39;80004005&#39;

Oct 26, 2000

Microsoft SQL Server 6.50 - 6.50.416 (Intel X86)
Jan 23 1999 14:10:24
Copyright (c) 1988-1997 Microsoft Corporation

In a SP I generate the infor RDO in a temporate tables. When i call on ASP send this :
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver]Protocol error in TDS stream
/asp/rdo/rdo_mty/automatico/rdoejecutivo.asp, line 10

View 1 Replies View Related

Where Can I Download The OLE DB Provider For Microsoft Active Directory Service

Feb 23, 2006

Hi,

Where can I download the OLE DB Provider for Microsoft Active Directory Service.

I'm using sql server 2005, windows server 2003. not sure the version of AD. (all 32 bit).

Cheers
Chris

View 1 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers Error '80040e07'

Feb 16, 2004

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Our SQL - INSERT INTO tbl_WAAGUsage (logindate,logintime,countryname,subscriberid,ipad dress) VALUES ('2/16/2004','9:50:01 AM','Albania',62,'123456789')

Hi,

I was wondering if somebody could help me... the following error message appears when I run an asp page... I did a google search and nobody appears to have had a solution to the particular problem I have... it's completely baffling but I'm hoping it's a simple setting.

Firstly, I'm sure the coding the correct as the asp page runs on two different servers correctly. I recently got a new server and the script does not appear to work with the Date function in asp on this new server. I outputted the SQL to the browser and then ran it through the Query Analyser(QA) and guess what, it worked! But when I run the asp page the above error crops up... now when I run the SQL through QA and alter the date value in the format 'dd/mm/yyyy' the above error appears in QA.. if I've lost you at this point let me know...

The way ASP passes the Date value to my SQL DB appears to be confused and it's really confusing me as it works perfectly on two servers and not the new one... the new server runs newer versions of O/S and SQL so I'm not sure that is the case... I've changed the date settings on the server so they all three servers match each other... so I have no where else to turn... any help and pointers would be much appreciated!

Regards

Steve

View 6 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers Error '80004005'

Sep 19, 2006

Hi everybodyMy problem with sql server is the following one:I've got my backoffice manager application done with asp technologythat works on sql server installed on Win2000 and running on IIS5.what I've done is simply doing a backup of my db and moving the aspapplication on another server: Windows 2003 with IIS6 and sql serververs.8.Then I tried to set up everything as in the beginning on the previousmachine(Win2K), but I'm getting this error:Microsoft OLE DB Provider for SQL Server error '80004005'[DBNETLIB][ConnectionOpen (Connect()).]Server SQL inesistente o accessonegato.(translated would be "SQL Server doesn't exist or access denied")/sitowebsite/bom/login.asp, line 13....where in the line 13 is set the connection to the database:Conn.Open Application("DBsource")which should be driven by what is set inside the global.asa file:Application("DBsource")="Provider=SQLOLEDB;server=127.0.0.1;database=db_nam e;uid=db_uid;pwd=db_pwd;"Application("WS_DB_TYPE") = ( "SQLSERVER" )I tried to restore the database just not losing information and nothinghappens.I tried also to create a new user and modify the properties as itshould be from the previous settings in the db(db_owner,....etc), stillnothing.any clue is appriciated.many thanks in advance.

View 1 Replies View Related

Microsoft OLE DB Provider For ODBC Drivers Error '80040e14'

Jul 20, 2005

Hi guys, it's nice to join the forum. Can someone can help me?After 2 years of using a program, i suddenly got this error. I triedre-installing SQL but im still getting the message.Microsoft OLE DB Provider for ODBC Drivers error '80040e14'[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot load the DLLxplog70.dll, or one of the DLLs it references. Reason: 193(error notfound).

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved