Problem: MySQL Query Doesn't Work With SQL Server

Nov 9, 2007

I made a page for a baseball league a couple of years ago using PHP and MySQL, and decided this winter to switch it to ASP.Net and SQL Server Express that comes with VWD 2005 Express Edition.

Anyways, I ran into a problem when trying to convert the query I made with MySQL into SQL Server.

My old code was something like this:

SELECT homeScore, visitorScore, ( homeScore > visitorScore ) AS homeWins, ( visitorScore > homeScore ) AS visitorWins FROM Schedule

This worked fine in MySQL, and returned the home team's score, visiting team's score, and then returned a 1 in homeWins if the home team won. Now, when I try running this query in SQL Server Express, I get an error saying "Invalid column name 'visitorScore > homeScore' ".

Can anyone please help me with what I should be doing differently so this works in SQL Server Express?! Thanks in advance!!!

View 17 Replies


ADVERTISEMENT

Weird!! &&< Sign Doesn't Work Within DataReader Source Connecting To Mysql Using ADO.NET ODBC Option

Jul 25, 2007

my package contains

Two connections ==> one is using OLEDB connecting to SQL server 2005 and the other using ADO.NET's ODBC option to connect to mysql;



Two "Execute SQL Task" ==> one gets maximum ID(bigint) from a SQL server table and the other gets the maximum ID(unsigned) from a mysql's table and bind them to two variables ID1(string) and ID2 (int 64). http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1902297&SiteID=17&mode=1 ;



And one DataFlow whose data source is DataReader Source which queries mysql "select * from table where ID > cast(@ID1 as signed) and ID <= cast(@ID2 as signed) ". To debug, I put a DataViewer between Data Flow Source and Data Flow Destination.



Run the package, I found no data coming into DataViewer and no error message as well. However if I remove the "<=" sign and change the DataReader Source query to "select * from table where ID > cast(@ID1 as signed)", It works perfectly. Initially I thought it's variable @ID2's issue. But if I replace "<=" sign with ">=" sign in the query ==> "select * from table where ID >= (cast(@ID2 as signed) -100)", there is no problem. After tried many times, I found that query just doesn't work with "<" sign or "between". Plus the result of running package tells it's successful but just no records got inserted into Data Flow Destination.



Anyone could help? Thanks!

View 3 Replies View Related

Link Server Doesn't Work Except Through Query Analyzer: MSSQL Freezing / Timing Out

Jan 7, 2007

Environment:Server1 (Local)OS Windows 2000 ServerSQL Server 2000Server2 (Remote)OS Windows 2003 ServerSQL Server 2000(Both with most recent service packs)Using Enterprise Manager, we have set up the Link Server (LINK_A) inthe Local Server 1 to connect to Server 2.The SQL we need to run is the following:INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxx;When we run this from the Query Analyzer, it completes with no problemsin a few seconds.Our problem:When we add the DTS Package as the ActiveX Script (VB Script) to theLocal Package, it times out at "obj_Conn.Execute str_Sql"Dim Sql, obj_ConnSet obj_Conn = CreateObject("ADODB.Connection")obj_Conn.Open XXXXobj_Conn.BeginTransstr_Sql = "INSERT INTO table1("str_Sql = str_Sql & "column1"str_Sql = str_Sql & ", column2"str_Sql = str_Sql & ")"str_Sql = str_Sql & " SELECT A.column1"str_Sql = str_Sql & ", A.column2"str_Sql = str_Sql & " FROM LINK_A.catalog_name.dbo.table2 AS A"str_Sql = str_Sql & " WHERE A.column1 0"str_Sql = str_Sql & ";"obj_Conn.Execute str_Sql----------------------------------------------------------When we make a Stored Procedure and run the following SQL, it freezes.INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxxWe've also tried the following with the same results;INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM [LINK_A].[catalog_name].[dbo].[table2] AS AWHERE A.column1 xxxxThe same thing happens when we try to run the "SELECT" by itself.SELECT TOP 1 @test=A.column1FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxxORDER BY A.column1What is going wrong here, and how do we need to change this so that itruns without timing out or freezing?

View 2 Replies View Related

Why The Query Works In Query Analyser And Doesn't Work In Reporting Service ?

Apr 30, 2007



Hello everybody,



I'm developing a report using the following structure :



declare @sql as nvarchar(4000)

declare @where as nvarchar(2000)



set @sql = 'select ....'



If <conditional1>

begin

set @where = 'some where'

end



If <conditional2>

begin

set @where = 'some where'

end



set @sql = @sql + @where



exec(@sql)



I run it in query analyser and works fine, but when I try to run in Reporting Services, Visual studio stops responding and the cpu reaches 100 %.



I realize that when I cut off the if clauses, then it works at Reporting services.

Does anybody know what is happening?

Why the query works in query analyser and doesn't work in Reporting Service ?



Thanks,



Maurício

View 2 Replies View Related

Delete Query That Doesn't Work ???

Apr 19, 2007

Hi!



Do you know why this query is ok on SQL 2005 and not on SQL ce ??






Code Snippet

DELETE ProfilesGroups

FROM ProfilesGroups pg

INNER JOIN Groups g

ON tpGroupID = g.gId

WHERE pg.tpProfileID = '7df60fae-a026-4a0b-878a-0dd7e5308b09'

AND g.gProfileID = '8a6859ce-9f99-4aaf-9ed6-1af66cd15894'



Thx for help ;-).



PlaTyPuS

View 1 Replies View Related

Query Works Fine Outside Union, But Doesn't Work .. .

Mar 31, 2004

hi all

I have the following query which works fine when it's executed as a single query. but when i union the result of this query with other queries, it returns a different set of data.

any one know why that might be the case??


select top 100 max(contact._id) "_id", max(old_trans.date) "callback_date", 7 "priority", max(old_trans.date) "recency", count(*) "frequency" --contact._id, contact.callback_date
from topcat.class_contact contact inner join topcat.MMTRANS$ old_trans on contact.phone_num = old_trans.phone
where contact.phone_num is not null
and contact.status = 'New Contact'
group by contact._id
order by "recency" desc, "frequency" desc




i've included the union query here for completeness of the question



begin
declare @current_date datetime
set @current_date = GETDATE()


select top 100 _id, callback_date, priority, recency, frequency from
(
(
select top 10 _id, callback_date, 10 priority, @current_date recency, 1 frequency --, DATEPART(hour, callback_date) "hour", DATEPART(minute, callback_date) "min"
from topcat.class_contact
where status ='callback'
and (DATEPART(year, callback_date) <= DATEPART(year, @current_date))
and (DATEPART(dayofyear, callback_date) <= DATEPART(dayofyear, @current_date)) -- all call backs within that hour will be returned
and (DATEPART(hour, callback_date) <= DATEPART(hour, @current_date))
and (DATEPART(hour, callback_date) <> 0)
order by callback_date asc
--order by priority desc, DATEPART(hour, callback_date) asc, DATEPART(minute, callback_date) asc, callback_date asc
)
union
(
select top 10 _id, callback_date, 9 priority, @current_date recency, 1 frequency
from topcat.class_contact
where status = 'callback'
and callback_date is not null
and (DATEPART(year, callback_date) <= DATEPART(year, @current_date))
and (DATEPART(dayofyear, callback_date) <= DATEPART(dayofyear, @current_date))
and (DATEPART(hour, callback_date) <= DATEPART(hour, @current_date))
and (DATEPART(hour, callback_date) = 0)
order by callback_date asc
)
union
(
select top 10 _id, callback_date, 8 priority, @current_date recency, 1 frequency
from topcat.class_contact
where status = 'No Connect'
and callback_date is not null
and (DATEPART(year, callback_date) <= DATEPART(year, @current_date))
and (DATEPART(dayofyear, callback_date) <= DATEPART(dayofyear, @current_date))
and (DATEPART(hour, callback_date) <= DATEPART(hour, @current_date))
order by callback_date asc
)
union
(
select top 100 max(contact._id) "_id", max(old_trans.date) "callback_date", 7 "priority", max(old_trans.date) "recency", count(*) "frequency" --contact._id, contact.callback_date
from topcat.class_contact contact inner join topcat.MMTRANS$ old_trans on contact.phone_num = old_trans.phone
where contact.phone_num is not null
and contact.status = 'New Contact'
group by contact._id
order by "recency" desc, "frequency" desc
)
) contact_queue
order by priority desc, recency desc, callback_date asc, frequency desc

end

View 1 Replies View Related

Pass-thru Query Doesn't Work With A SQL 2005 SSIS Package

Dec 14, 2007

I am trying to execute an SSIS package from an MS Access 2003 database that imports a table from the Access database into a target table in SQL 2005. I saved the package in SQL 2005 and tested it out. If I run it from the Management Studio Console with Run->Execute ... everything works just fine. However, if I try to run it using the following line command "Exec master.dbo.xp_cmdshell 'DTExec /SER DATAFORCE /DTS SQL2005TestPackage /CHECKPOINTING OFF /REPORTING V'" the execution will always fail when the Access database is open (shared mode). The connection manager looks like this: "Data Source=E:Test.mdb;Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Jet OLEDB:Global Bulk Transactions=1". The error is listed below:

Code: 0xC0202009
Source: NewPackage Connection manager "SourceConnectionOLEDB"
Description: An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Could not use ''; file already in use.".


What am I doing wrong?

View 4 Replies View Related

JDBC: PreparedStatement#getParameterMetaData() Doesn't Work For INSERT SQL Query

Feb 26, 2008

Hi,

I'm using MSSQL 2005 JDBC driver version 1.2 with MSSQL Server 2005. Getting parameter's metadata doesn't seem to be working properly there. PreparedStatement#getParameterMetaData() works fine if PreparedStatement is created for some SELECT but fails for any INSERT statements. The same code works fine with other DBs (I checked with HSQLdb and PostgreSQL). See sample below

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbcqlserver://mssql2005\mssql2005;DatabaseName=alexdtms;user=xxx;password=xxx";

// I don't care about non-closed statements, it's just sample code
Connection con = DriverManager.getConnection(connectionUrl);
con.createStatement().executeUpdate("CREATE Table Table1 (RECORD_ID varchar, TgtQty float)");
PreparedStatement ps = con.prepareStatement("INSERT INTO Table1 VALUES ( ?,? )");

ParameterMetaData pmd = ps.getParameterMetaData();// <-- !!!! Exception is thrown here
for (int i = 1, count = pmd.getParameterCount(); i <= count; i++)
{
System.err.println(">>>>AD_TEMP " + pmd.getParameterType(i) + " " + pmd.getParameterTypeName(i) + " " + pmd.getParameterMode(i));
}

Thanks,
Alexander Dolgin

View 1 Replies View Related

Moving Data From Mysql To Sql Server 2005. Does Not Work!!

Nov 9, 2006



Problem: Moving data from mysql to sql server 2005

I am trying to pull data over from mysql to sql server. First the import wizard greys out so I have to put in 1 query at a time which is pain. and second it does not even work! it takes me through the end of the wizard for me to click finish and then says oops it does not work. there was an error!



Anyway i tried going through the ssis route cuz its going to be a nightly job. i used the ado.net odbc connection. It worked but the performance is really not acceptable. it took 5 mins to import 24000 rows where as dts was taking 1 sec to do this. i wish i could use the native mysql odbc 3.51 connector and import. can some one give me step by step instructions on how to do that ?



I hear someone mentioned of using excute sql task which can use mysql odbc 3.51 driver. but since i am new how do i get it to work. say for example in the excute sql task i run a statement like select * from addr. then what?

cuz eventually i want the result to be saved in a sql server table called addr. How can i get the result from that excute sql task and put it inside of an addr table in sql server. should i save the result to a variable of type object. but then how do i get the data from object and tell sql server in the designer that the result contains these columns and it needs to map to these columns in the addr table of sql server.

Very confused. i wish the first option would have given me results which an enterprise ETL gives. but apparently it is too slow that it wont be acceptable in a production envrioment. when i will have millions of rows coming in .



Please anyone can help me in this.



Thanks for the help!

View 1 Replies View Related

SQL Server 2000: TCP/IP Doesn't Seem To Work

Nov 24, 2006

I have the following situation: A webserver in a DMZ which connects to a DbServer in a Domain.

but when I try to make a ODBC connection on the webserver I get the well-known "Server does not exist or access denied" error.

I tried using IP address as well as FQDN. I turned off the firewall in the router (I'm able to access shares and what not from the webserver so the firewall is really turned off).

I think however i have narrowed down the problem to the TCP/IP connection of the SQL Server. Normally when you try from a command prompt
"telnet dbserver 1433" you get a connection. But when I try this to the specific DbServer I get an "unable to connect" error. Even when I try it on the dbserver itself (so telnet localhost 1433). This should work always?

In the network configuration of the sql server the Named Piped as well as the TCP/IP protocols are enabled. TCP/IP is offcourse configured on port 1433.

How can I fix this problem?

View 2 Replies View Related

ASP.NET Cachin With SQL Server Doesn't Work. Help Needed.

Aug 28, 2007

Hello! I'm trying to get caching work with ASP.NET 2.0 and SQL Server 2005, but I have a problem and I can't figure out what I'm doing
wrong.I have tried to do everything according to the instructions. I
have enabled the database for cache notification by running the
aspnet_regsql tool on the command line like this:aspnet_regsql -S server
-E -d database -etThen I have run the aspnet_regsql tool to enable each
table in the database for cache notification:aspnet_regsql -S server -E
-d database -et -t tablenameI have added the necessary parts into
web.config file, so that it is like
this:<connectionStrings><add name="ConnectionString1"
connectionString="DataSource=servername;Database=databasename;Integrated
Security=True"providerName="System.Data.SqlClient"/> </connectionStrings> <system.web>   
<caching>      <sqlCacheDependency enabled="true"
pollTime="2000">        <databases>          <add
connectionStringName="ConnectionString1"              
name="KJ"/>        </databases>     
</sqlCacheDependency>    </caching>I have added this
into global.asax file for the application start event:       
System.Data.SqlClient.SqlDependency.Start(ConfigurationManager.ConnectionStrings("ConnectionString1").ToString())To
test caching I wrote this piece of code where I get data from the table
MAAKUNNAT in
the database.----------SqlCacheDependencyAdmin.EnableTableForNotifications(ConfigurationManager.ConnectionStrings("ConnectionString1").ToString(),"MAAKUNNAT")Dim
maakunnatDS As New DataSetIf Cache.Get("maakunnat") Is Nothing
Then            Dim myConnection As
NewSqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString1").ToString())           
myConnection.Open()            Dim cmd As New SqlCommand("haemaakunnat",
myConnection)            cmd.CommandType =
CommandType.StoredProcedure            Dim riippuvuus As New
SqlCacheDependency("KJ", "MAAKUNNAT")            Dim aggDep As New
AggregateCacheDependency           
aggDep.Add(riippuvuus)            Dim maakunnatDA As SqlDataAdapter =
New SqlDataAdapter            maakunnatDA.SelectCommand =
cmd            maakunnatDA.Fill(maakunnatDS, "MAAKUNTA")           
myConnection.Close()            Cache.Insert("maakunnat", maakunnatDS,
aggDep)        Else            Response.Write("The data is in the
cache")            maakunnatDS = Cache.Get("maakunnat")End
If-----------------But when I run the page I get this
error.------------------------------------------The 'MAAKUNNAT'
table in the database 'KJ' is not enabled for SQL
cachenotification.Please make sure the table exists, and the table
name used for cachedependency matches exactly the table name used in cache
notificationregistration.To enable a table for SQL cache
notification, please useSqlCacheDependencyAdmin.EnableTableForNotifications
method, or the commandline tool aspnet_regsql. To use the tool, please run
'aspnet_regsql.exe -?'for more information.To get a list of enabled
tables in the database, please
useSqlCacheDependencyManager.GetTablesEnabledForNotifications method, or
thecommand line tool
aspnet_regsql.exe.----------------------------------------------When I
run the aspnet_regsql tool with the -lt parameter to get a list of enabled
tables in the database they are all enabled. I have searched many pages in
the internet and I cannot find out what I'm still doing wrong. I'd
appreciate it very much if someone could help me with this
problem.Toni S.  

View 5 Replies View Related

Why MDTC Doesn&#39;t Work On Clustered Server?

Sep 20, 2000

View 3 Replies View Related

SQL Server Destination Doesn't Work On Vista?

Mar 19, 2007

All,

I have a package that works fine on XP. I copy it (and the databases used within it) to my new Vista Business Edition box (with SQL 05 SP2 with Hotfix.) Both the source and destination databases are on the 05 SP2 with Hotfix installation on this Windows Vista box (this is a completely local transformation.) The account I am logged in with is an Administrator on the box (and I have done the whole Vista provisioning deal.) Furthermore BUILTINAdmins is not disabled. Furthermore I went so far as giving this account every server role.

Short of it is when I use SQL Destination it fails - regardless of the options used. When I use an Ole Db Destination it works.

So, to prove that I am not crazy I recreated this package from scratch, and used a SQL Server Destination. The account I am using has essentially every permission imagineable. And to repeat: yes, I'm transferrring from a local database (on this box) to another database (on this box) and SSIS is running through BIDS on this box.

At this point I'm beginnning to think that it is broken on Vista, but I can't believe someone else hasn't run into this. However, when I look at the groups - nothing. Any ideas?

Thanks,

dcb99

View 1 Replies View Related

SQL Server 2014 :: Update Row Always Has Results But Still Doesn't Work

Jun 11, 2014

I have this script in my database, but it always gives 2054 rows back and if I actually DO change something it doesn't even notice...

UPDATE a
SET a.[omschrijving]=SP.[omschrijving]
,a.[verkoopprijs]=SP.[verkoopprijs]
,a.[gewijzigd]=getDate()
FROM [artikelen] a
LEFT OUTER JOIN [Hofstede].[dbo].[sparepartsupdate] SP
ON a.PartNrFabrikant = sp.PartNrFabrikant
WHERE ((A.omschrijving != SP.[omschrijving]) OR (A.[verkoopprijs] != SP.[verkoopprijs]))

View 9 Replies View Related

Sql Server Doesn't Work Well With 250ms+ Network Latency

Oct 15, 2007

Hello,I'm an absolute newbie when it comes to SQL. I was told that SQLserver does not function well on a WAN where network latency between,say, the SQL server and a front-end server is greater than 250ms.I can't find anything information supporting this claim online, so Iwas hoping someone here could tell me if this is true or not?Thank You!!

View 2 Replies View Related

SQL Server Reporting Services - Link Doesn't Work

May 19, 2008

Hi.

I have a problem.
I do a basic report with just one simple table:
_id
_name
_comment
_file

I'm able to get all informations into a table. But for the file, I created a URL Link for this file.
But when the reporting is generating in html, if I click on the file's link, nothing happens. But I can dowload the file with a right click. And if I see proprieties of the link, the link is rights, and it's works good if I copy and paste it on the IE url bar.

So for summary, my problem is : nothing happens if I click on the file, but a want a window's opening with the choose "Open with" or "Save on the disk".

Somebody can help me?
Thanks

View 1 Replies View Related

SQL Server 2005 Express Doesn't Work With .NET Framework 3.0

Sep 22, 2007

Hi,

Can anybody help me with the following problem:

I have Vista Ultimate installed and within Vista .NET Framework 3.0 is installed as a part of the operating system so I can't remove 3.0
Now for MS SQL Server 2005 Express I need .NET Framework 2.0 and the SQL Server 2005 doesn't work with .NET Framework 3.0
Can't install 2.0, get the message that 3.0 is already installed.
Is there another version of SQL Server that works with .NET Framework 3.0 and runs under Vista Ultimate?
Please help me!!

René

View 3 Replies View Related

Maintenance Plan For SQL Server 2005 64-bit Doesn't Work!

Jul 5, 2007

Hi all,
We have a SQL Server 2005 64-bit, and recently I upgrade from build 3042 to 3054 and I try to do a maintenance plan for transaction logs(TL) backup, including cleanup for two days (have full backup every night).

Problem I have is that I want the TL files to dump in a different location(due to disk space), so I put in the UNC path in the "Create a backup file for every database - >Folder:\FileServerTLDBLogs"

NB: if using the local drives, it work

Check List
Security:
- The account that I used to create the plan is an sa account
- The location that I dump the TL files, I have full access to the folder

SQL Statement:
exec xp_cmdshell 'dir FileServerTLDBLogs' (it list all files)

Is this a bug for 64-bit? because I can do this on SQL Server 2005 32-bit and it's work perfectly

View 1 Replies View Related

Migrated From SQL 2k5 Express To SQL Server - Profile Doesn't Work

Aug 22, 2006

I recently created an application that stores 3 variables in the web.config in the "Profile"configuration:

<profile>
<properties>
<add name="Department" defaultValue="" />
<add name="UserName" defaultValue="Anonymous" allowAnonymous="true"/>
<add name="AL" defaultValue="" />
</properties>
</profile>

By doing this my web.config automatically configured itself to create a database in my app_data folder and also filled in all the table rows as necessary. Then I moved the code to my sql server running SQL Server 2005 Standard and found out that it won't generate that database in either the app_data folder or the SQL Server Data directory. I've gotten so desperate to get this database created that I've (temporarily) given "Everyone" full permissions to both directories. I then double checked that my named pipes to that server were enabled, and then also tried moving my database from my working sql express app from a different computer to the server. I still cannot get it to work.

If I have no database in the folders that worked on sql express i get this error:

"SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express ..."

If I have a database in the folder it says it can't communicate with it or can't find it.

My web.config shows:


<add name="LocalServer" connectionString="server=SERVERNAMEWest;database=ASPNETDB.MDF;uid=UserName;pwd=Password;" PoviderName="System.Data.SqlClient" />

Is there a way to successfully generate this database with sql server? Please Help!!!

View 1 Replies View Related

Transfer SQL Server Objects Task Doesn't Work

Apr 24, 2006

Source Database: SQL Server 2000

Destination Database: SQL Server 2005

No matter what table, view, or stored proc I pick, it always says that it doesn't exist at the source. I know it exists because I am picking it from the list of tables, etc. that the GUI provides.

Any suggestions?

Jonathan Allen

View 1 Replies View Related

Linked Server Excel Import Doesn't Work In Vista

Jan 15, 2008

I was using linked servers to import Excel spreadsheets into SQL Server Express 2005. This worked fine with Windows XP and Office 2003.

I have just migrated all my stuff to Vista and Office 2007. Linked servers just can't be created:

TITLE: Microsoft SQL Server Management Studio Express
------------------------------
"The linked server has been created but failed a connection test. Do you want to keep the linked server?"
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "XXX".
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "XXX" returned message "Unspecified error". (Microsoft SQL Server, Error: 7303)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476
------------------------------
BUTTONS:
&Yes
&No
------------------------------

The parameter values I used are:

Provider: Microsoft Jet 4.0 OLE DB Provider
Product name: Excel
Data source: D:...somelocalfile.xls
Provider string: Excel 8.0

I gave full access rights to the Data source file and folder to NETWORK SERVICE and SQLServer2005MSSQLUser$MOZART$SQLEXPRESS where mozart is my PC name.

If I change Data source or Provider string to some garbage string, the exact same error message appears. So it appears the error might be in the Provider?

Help help please.

View 4 Replies View Related

Transfer SQL Server Objects Task Doesn't Work With Schemas

May 31, 2006

The task has a fault if you try to copy a table with a schema like [test].[table1]

The error says

Error: 0xC002F363 at Flyt til DM, Transfer SQL Server Objects Task: Table "table1" does not exist at the source.

Even though i just selected it from the table list minutes before.

View 7 Replies View Related

Integrated Security Doesn't Work - Not Associated With A Trusted SQL Server Connection. Error

Oct 20, 2006

 

Hi,

I have a piece of Java code that needs to connect to SQL 2000 (SP4) using Windows Authentication. It's running on Windows Server 2003 SP1.

I tried JDBC v1.1 and followed the code from the following blog:

http://blogs.msdn.com/angelsb/default.aspx?p=1

But still get this error as shown below. Any help appreciated.

I am using JDK1.4.2, "sqljdbc_auth.dll" is located under "E:SQL2005JDBCDrvsqljdbc_1.1enuauthx86", also made a copy under "E:JavaTest" and "C:WindowsSystem32" but still won't work.

Cheers

Allan

 

===========================================================

E:JavaTest>javac -classpath ".;E:JavaTestsqljdbc.jar" TestW2.java

E:JavaTest>java -classpath ".;E:JavaTestsqljdbc.jar" -Djava.library.path=E:S
QL2005JDBCDrvsqljdbc_1.1enuauthx86  TestW2
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '(null)'.
 Reason: Not associated with a trusted SQL Server connection.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(Unknown Source)
        at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.processLogon(Unknown
 Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source
)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknow
n Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover
(Unknown Source)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Sour
ce)
        at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at TestW2.main(TestW2.java:7)
===========================================================

The code is simple (TestW2.java):

import java.sql.*;

public class TestW2 {
 public static void main(String[] args) {
  try {
   java.lang.Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
   Connection conn = java.sql.DriverManager.getConnection("jdbc:sqlserver://VMW2k3ENT003.TESTCBFPOC.COM.AU;integratedSecurity=true");
   System.out.println("Connected!");
   conn.close();

  } catch (Exception ex) {
   ex.printStackTrace();
  }
 }
}

==============================================================

View 27 Replies View Related

Update Query In Ms-access Doesn't Workin C#, But Does Work In Ms-access

Apr 18, 2007

Hi,

I have an application that uses following code:



Code Snippet







using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using System.Collections;

namespace TimeTracking.DB
{
public class sql
{
OleDbConnection conn;

//
//the constructor for this class, set the connectionstring
//
public sql()
{
DBConnectionstring ConnectToDB = new DBConnectionstring();
conn = ConnectToDB.MyConnection();
}

//
//
//
public void UpdateEntry(int ID, string Week, string Year, string Date, string Project, string Action, string Time, string Comment)
{
int m_ID = ID;
int m_Week = (Convert.ToInt32(Week));
int m_Year = (Convert.ToInt32(Year));
string m_Date = Date;
string m_Project = Project;
int m_ProjectID = new int();
string m_Action = Action;
int m_ActionID = new int();
Single m_Time = (Convert.ToSingle(Time));
string m_Comment = Comment;

//
//get the project ID from the database and store it in m_ProjectID
//
OleDbCommand SelectProjectID = new OleDbCommand("SELECT tblProject.ProjectID FROM tblProject"
+ " WHERE (((tblProject.Project) LIKE @Project))", conn);

SelectProjectID.Parameters.AddWithValue("@Project", m_Project);

try
{
//open the connection
conn.Open();

OleDbDataReader Dataset = SelectProjectID.ExecuteReader();

while (Dataset.Read())
{
m_ProjectID = (int)Dataset["ProjectID"];
}

Dataset.Close();
}

//Some usual exception handling
catch (OleDbException e)
{
throw (e);
}

//
//get the action ID from the database and store it in m_ActionID
//
OleDbCommand SelectActionID = new OleDbCommand("SELECT tblAction.ActionID FROM tblAction"
+ " WHERE (((tblAction.Action) LIKE @Action))", conn);

SelectActionID.Parameters.AddWithValue("@Action", m_Action);

try
{
OleDbDataReader Dataset = SelectActionID.ExecuteReader();

while (Dataset.Read())
{
m_ActionID = (int)Dataset["ActionID"];
}

Dataset.Close();
}

//Some usual exception handling
catch (OleDbException e)
{
throw (e);
}



//
//
//
OleDbCommand Query = new OleDbCommand("UPDATE [tblEntry] SET [tblEntry].[Weeknumber] = @Week,"
+ " [tblEntry].[Year] = @Year, [tblEntry].[Date] = @Date, [tblEntry].[Project] = @ProjectID, [tblEntry].[Action] = @ActionID,"
+ " [tblEntry].[Hours Spent] = @Time, [tblEntry].[Comments] = @Comment WHERE (([tblEntry].[ID]) = @ID)", conn);

Query.Parameters.AddWithValue("@ID", m_ID);
Query.Parameters.AddWithValue("@Week", m_Week);
Query.Parameters.AddWithValue("@Year", m_Year);
Query.Parameters.AddWithValue("@Date", m_Date);
Query.Parameters.AddWithValue("@ProjectID", m_ProjectID);
Query.Parameters.AddWithValue("@ActionID", m_ActionID);
Query.Parameters.AddWithValue("@Time", m_Time);
Query.Parameters.AddWithValue("@Comment", m_Comment);

try
{
Query.ExecuteNonQuery();
}

//Some usual exception handling
catch (OleDbException e)
{
throw (e);
}

finally
{
//close the connection
if (conn != null)
{
conn.Close();
}
}
}
}
}

Code Snippet



The update statement is not working in my application, no error in C# and no error in ms-access. When I paste the update query into the ms-access query tool and replace the parameter values (@....) with real values, is will update the record.

What am I overseeing here?
--Pascal

View 13 Replies View Related

Host Doesn't Have MySQL Data Provider Installed

Apr 26, 2008

Hi,I'm using a MYSQL database for this project.  I installed hte .Net Framework Data Provider on my computer for development, but how can I get it on the host(LunarPages.com)  Can I manually call on files in the connectionString or do I need to ask the tech support to install it for me, which will most likely not happen. Gosh, their windows servers lack sooo many things.    Edit: I just tried uploading the source files of the data provider into my app_data directory.  No change. Help? ThanksNick 

View 11 Replies View Related

DTS Doesn't Work Through Job

Sep 15, 2005

I'm pretty new to DTS, so forgive me if this is basic. I created a simple DTS package to run a query and export it to a text file. I can execute the package fine from my workstation through EM, but when I try to execute the job to run the package I get this error:
Error = -2147467259 (80004005) Error string: Error opening datafile: Access is denied.

I think that maybe SQL Agent doesn't have the right permissions to write to that network drive. What should the permissions be?

View 3 Replies View Related

IIF Doesn't Work

Nov 10, 2004

This is probably very simple, but I can't get passed this problem.

I have a report in MS Access that uses info generated by a query. One of the text fields in the query contains either the word 'Select' or the name of a course.
The report should display a space if the value is 'Select', or the actual value of the field in any other case. The field can never contain a null value.

I've used:
=IIf([optVoc1]="Select","",[optVoc1])
in the text box on the report, but this only returns #error regardless of the actual content of the field.

What am I doing wrong?

Regards,

BD

View 5 Replies View Related

Sql Job Doesn't Work

Aug 27, 2004

Hi all,

I create and schedule a SQL job to run every minute to update a table base on certain condition but it doesn't work. Job history says successful every time but the table doesn't get updated.

However if I move it to Query Analyzer and run it under dba, it will work. Thinking that it may have to do with the user the job run as, I then change run as user from self to dba. But still SQL job won't update my table.

Anything about user permission or security that I can check? Or it there any other possibility?

TIA

View 1 Replies View Related

Why Doesn't This Work

Apr 26, 2007

When I run the select its fine but I cannot delete..... i have done this many times and it has worked.... I cannot see the error what am i missing

select
eqnow.empnumber,
eqnow_names.empnumber,
eqnow_names.names
--delete
from
eqnow
inner join eqnow_names
on eqnow.empnumber = eqnow_names.empnumber
where
eqnow_names.names is null



i get this error
Server: Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'inner'.

View 3 Replies View Related

Doesn't Work

Oct 21, 2007



Msg 15123, Level 16, State 1, Procedure sp_configure, Line 78

The configuration option 'user instances enabled' does not exist, or it may be an advanced option.



Valid configuration options are

View 1 Replies View Related

Help! LIKE Doesn't Work!!!

Apr 19, 2008

Hi to all, I'm building (and learn) an application with VB Express. In "edit dataset with designer" I've build this sql query:

SELECT tbl_soggetto.[ID Soggetto], tbl_soggetto_tipo.Tipo, tbl_soggetto.[Cognome/Denominazione], tbl_soggetto.Nome, tbl_soggetto.Indirizzo, tbl_soggetto.CAP, tbl_soggetto.Città , tbl_soggetto.Provincia, tbl_soggetto.[Telefono 1], tbl_soggetto.[Telefono 2], tbl_soggetto.[Telefono 3], tbl_soggetto.[Telefono 4], tbl_soggetto.[eM@il 1], tbl_soggetto.[eM@il 2], tbl_soggetto.Note
FROM tbl_soggetto INNER JOIN tbl_soggetto_tipo ON tbl_soggetto.[ID Tipo] = tbl_soggetto_tipo.[ID Tipo]
WHERE (tbl_soggetto.[Cognome/Denominazione] LIKE '%' + @Testo + '%')


The LIKE doesn't work!
I call the query with Me.griglia.DataSource = Me.TA_tbl_soggetto_ricerca.Search_Cognome(Me.txt_trova.Text.Trim)

But with LIKE '%ABC%' work!

Me.griglia.DataSource = Me.TA_tbl_soggetto_ricerca.Search_Cognome()

Someone can help me? Thanks...

View 12 Replies View Related

SET Doesn't Work

Dec 11, 2006

When I try to install the problem I get the following error.

The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually."

The log tells me nothing useful. I can't start the thing manually because after clicking cancel on the error message, the installer proceeds to roll back the installation.

How do I fix this problem?








View 3 Replies View Related

Sum In Subquery Doesn't Work Well

Jun 8, 2005

This is the autogenerated code from the SelectCommand of my DataAdapter, except the red text. This DataAdapter is used to fill a DataGrid. What I want to do, is to calculate the total memory (4 slots) / PC.This code makes the sum of all memory of all PC's together.I'm not sure if the group by clause is needed here ...Me.OleDbSelectCommand1.CommandText = "SELECT PC.ID, PC.Nummer, PC.Netwerknaam, Case_Type.Type AS Case_Type, Processor_T" & _"ype.Type AS Processor_Type, Processor_Snelheid.Snelheid AS Processor_Snelheid, " & _"(SELECT SUM(Memory) FROM Memory, PC, RAM WHERE RAM.PcID = PC.ID AND RAM.GrootteID = Memory.ID)" & _"AS Memory, OS.Naam AS OS, OS_SP.Nummer AS OS_SP, Gebru" & _"iker.Naam AS Gebruiker_Naam, Status.Status, PC.Tagged FROM (Status RIGHT OUTER J" & _"OIN ((((((((PC LEFT OUTER JOIN (RAM LEFT OUTER JOIN Geheugen ON RAM.GrootteID = " & _"Geheugen.ID) ON PC.ID = RAM.PcID) LEFT OUTER JOIN Case_Type ON PC.Case_TypeID = " & _"Case_Type.ID) LEFT OUTER JOIN OS_SP ON PC.OS_SpID = OS_SP.ID) LEFT OUTER JOIN Ge" & _"bruiker ON PC.GebruikersID = Gebruiker.ID) LEFT OUTER JOIN Processor_Snelheid ON" & _" PC.Processor_SnelheidID = Processor_Snelheid.ID) LEFT OUTER JOIN Processor_Type" & _" ON PC.Processor_TypeID = Processor_Type.ID) LEFT OUTER JOIN OS ON PC.OsID = OS." & _"ID) LEFT OUTER JOIN Switchbox_Details ON PC.ID = Switchbox_Details.PcID) ON Stat" & _"us.ID = PC.StatusID) GROUP BY PC.ID, PC.Nummer, PC.Netwerknaam, Case_Type.Type, " & _"Processor_Type.Type, Processor_Snelheid.Snelheid, OS.Naam, OS_" & _"SP.Nummer, Gebruiker.Naam, Status.Status, PC.Tagged"I would like to know how to calculate the total memory for each separate PC.Hope you can help me.

View 5 Replies View Related







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