Sunday, March 25, 2012
VERSION MDAC FOR SQL server 6.5 on WIN NT 4.0
SERVER WTIH SQL 6.5 SERVER SP 5
to connect or transact or run procdure with SQL server
2000 from SQL 6.5
server
ThanksIf you need to connect to a named instance on the SQL Server 2000 machine
with creating an alias, the lowest level of MDAC should be MDAC 2.6.
However, if you want to use all the functionality of the SQL Server itself
you should install the level of MDAC that is installed on the SQL Server
2000 machine.
Rand
This posting is provided "as is" with no warranties and confers no rights.sql
HLEP..Sql Server UPDATE INNER JOIN QUERY ..
In access it was really easy to say
Inner join on table1 and table2 and update columnA from table1 with
columnC from table2 where table1.key = table2.key and table2 columnB =
1 and table2 columnD = 4
I have tried all manner of beasts to get this thing to work..
UPDATE dbo.GIS_EVENTS_TEMP
SET FSTHARM1 =
(SELECT HARMFULEVENT
FROM HARMFULEVENT
WHERE (HARMFULEVENT.CRASHNUMBER = GIS_EVENTS_TEMP.CASEID)
AND(HARMFULEVENT.UNITID = 1 AND HARMFULEVENT.LISTORDER = 0))
This almost works but ignors the 'HARMFULEVENT.UNITID = 1 AND
HARMFULEVENT.LISTORDER = 0' part which is really important
Any Help would be great...This way looks like it should work also but I get an error 'ADO Error:
HARMFULEVENT Does not match a table in the query' ?? Is this cuz you
can only show one table in an update qurey?
UPDATE dbo.GIS_EVENTS_TEMP
SET FSTHARM1 =
(SELECT HARMFULEVENT
FROM HARMFULEVENT
WHERE (HARMFULEVENT.UNITID = 1 AND
HARMFULEVENT.LISTORDER = 0))
WHERE (CASEID = HARMFULEVENT.CRASHNUMBER)|||SAME ADO ERROR WHEN I USE THIS ???
UPDATE dbo.GIS_EVENTS_TEMP
SET FSTHARM1 = HARMFULEVENT.HARMFULEVENT
FROM GIS_EVENTS_TEMP G INNER JOIN
HARMFULEVENT H ON G.CASEID = H.CRASHNUMBER
WHERE (H.UNITID = 1 AND H.LISTORDER = 0)|||(meyvn77@.yahoo.com) writes:
> Im using an ADP to connect to a SQL Sqever DB.
> In access it was really easy to say
> Inner join on table1 and table2 and update columnA from table1 with
> columnC from table2 where table1.key = table2.key and table2 columnB =
> 1 and table2 columnD = 4
>
> I have tried all manner of beasts to get this thing to work..
> UPDATE dbo.GIS_EVENTS_TEMP
> SET FSTHARM1 =
> (SELECT HARMFULEVENT
> FROM HARMFULEVENT
> WHERE (HARMFULEVENT.CRASHNUMBER = GIS_EVENTS_TEMP.CASEID)
> AND(HARMFULEVENT.UNITID = 1 AND HARMFULEVENT.LISTORDER = 0))
> This almost works but ignors the 'HARMFULEVENT.UNITID = 1 AND
> HARMFULEVENT.LISTORDER = 0' part which is really important
> Any Help would be great...
Unfortunately, it's not very easy to help if we don't know what
tables you have. The standard recommendation for this type of
problem is to post:
o CREATE TABLE statements of the tables nvolved. (Preferrably
cut down to the columns relevant to the problem.(
o INSERT statements with sample data.
o The desired result given the sample.
o A short narrative of the business problem.
The two first points makes it easy to copy and paste into Query Analyzer,
so a tested solution can be developed. The third point makes it possible
to verify that the solution is correct. And the fourth point gives some
extra information which helps to understand the general problem.
> This way looks like it should work also but I get an error 'ADO Error:
> HARMFULEVENT Does not match a table in the query' ?? Is this cuz you
> can only show one table in an update qurey?
> UPDATE dbo.GIS_EVENTS_TEMP
> SET FSTHARM1 =
> (SELECT HARMFULEVENT
> FROM HARMFULEVENT
> WHERE (HARMFULEVENT.UNITID = 1 AND
> HARMFULEVENT.LISTORDER = 0))
> WHERE (CASEID = HARMFULEVENT.CRASHNUMBER)
No, but because you are referring to HARMFULEVENT outside the subquery.
> AME ADO ERROR WHEN I USE THIS ???
>
> UPDATE dbo.GIS_EVENTS_TEMP
> SET FSTHARM1 = HARMFULEVENT.HARMFULEVENT
> FROM GIS_EVENTS_TEMP G INNER JOIN
> HARMFULEVENT H ON G.CASEID = H.CRASHNUMBER
> WHERE (H.UNITID = 1 AND H.LISTORDER = 0)
Here you are mixing use of aliases and table name. Once you have
introduced an alias, you can not refer to the full table name in
the query.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I don't think that you can write something like this:
SELECT HARMFULEVENT FROM HARMFULEVENT
connect to distribution server
desktop edition and then manually replicate to SQL2K on
server. Can't access the distribution server from the
mobile.
Thoughts suggestions etc?
thanks
Sorry to ask the obvious, but is this when you are connected to the network?
Assuming it is, please can you clarify a few things:
the complete text of the error message,
the type of security configuration of your agents - are you logged onto the
domain, using pass-through security etc
can you 'see' the distribution server - pinging it by name will test this
Regards,
Paul Ibison
|||The distribution server is running on a SQLServer2K SE
machine running W2K OS. The remote is a laptop with
SQLServer2K PE. Both the remote and the server are
registered in EM respectively. They are both part of the
same workgroup but not a domain.
The problem arises when I attempt to use the Configure
Publishing, Subsribers and Distribution Wizard for the
laptop instance (SQLServer2K PE), The Select Distributor
dialogue has the "Use the following server..."
option "grayed-out" as is the "Add Server" button.
The only choice is to use the local machine as the
distributor which I don't want to do.
Is this a limitation of SQLServer2K PE or am I doing
something wrong with my configuration?
In the final anaylsis I need to be able to add data on
the laptop when not conncected to the server and then
manually synchronize when connected.
Thanks for your help
Thanks
>--Original Message--
>Sorry to ask the obvious, but is this when you are
connected to the network?
>Assuming it is, please can you clarify a few things:
>the complete text of the error message,
>the type of security configuration of your agents - are
you logged onto the
>domain, using pass-through security etc
>can you 'see' the distribution server - pinging it by
name will test this
>Regards,
>Paul Ibison
>
>.
>
|||The only restriction I was previously aware of is that SQL Server 2000
Personal Edition cannot be used as publisher for transactional replication.
However if you have a look at this link in BOL :
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\rep
wizrd.chm::/repwizrd_97oi.htm
it seems you are correct. This is a limitation of Personal Edition.
However,
if you are running merge replication, the distinction between publisher and
subscriber in this regard is not so big, so having the mobile as a
subscriber is a posibility.
HTH,
Paul Ibison
|||Thanks. I suppose I will have to work with merge
replication.
>--Original Message--
>The only restriction I was previously aware of is that
SQL Server 2000
>Personal Edition cannot be used as publisher for
transactional replication.
>However if you have a look at this link in BOL :
>mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%
20Server\80\Tools\Books\rep
>wizrd.chm::/repwizrd_97oi.htm
>it seems you are correct. This is a limitation of
Personal Edition.
>However,
>if you are running merge replication, the distinction
between publisher and
>subscriber in this regard is not so big, so having the
mobile as a
>subscriber is a posibility.
>HTH,
>Paul Ibison
>
>.
>
VPN connection to an SQL Server and/or database
Can we connect remotely using SQL Server Enterprise Manager from our
home PCs using a VPN connection, across the Internet, to an instance
of SQL Server(or a database on it) that resides on an ISP's Server?
Can this be done using a VPN IP connection? I believe a static IP is
required for this?
Thanks in Advance, MichaelIn article <8a68c00d.0310180406.41af69bf@.posting.google.com>,
MikeTheBike@.tpgi.com.au says...
> Hi All
> Can we connect remotely using SQL Server Enterprise Manager from our
> home PCs using a VPN connection, across the Internet, to an instance
> of SQL Server(or a database on it) that resides on an ISP's Server?
> Can this be done using a VPN IP connection? I believe a static IP is
> required for this?
> Thanks in Advance, Michael
You don't need a fixed IP to use VPN, but if the destination has a fixed
IP it makes it easier to find the next time.
If the SQL server doesn't have a fixed IP then you are asking for
trouble.
It's standard practice for workers at home to have dynamic IP's and the
office to have fixed IP's.
--
--
spamfree999@.rrohio.com
(Remove 999 to reply to me)|||Hi
There is not reason why this should not work, although if you are not
part of the domain or on a trusted domain then you will probably have
to use SQL authentication.
I don't think a static IP is absolutely necessary, but it may be
required by the firewall/router for authentication.
John
MikeTheBike@.tpgi.com.au (Michael Holberton) wrote in message news:<8a68c00d.0310180406.41af69bf@.posting.google.com>...
> Hi All
> Can we connect remotely using SQL Server Enterprise Manager from our
> home PCs using a VPN connection, across the Internet, to an instance
> of SQL Server(or a database on it) that resides on an ISP's Server?
> Can this be done using a VPN IP connection? I believe a static IP is
> required for this?
> Thanks in Advance, Michael|||Hi John,
Thanks for your response. I couldn't set up a VPN connection but I was
able to connect directly, using the IP Address, using Enterprise
Manager. I had a brainwave earlier today and discovered I could also
setup an ODBC connection using the IP Address and hence link to Tables
from Access.
Regards Michael
jrm_bell@.hotmail.com (John Bell) wrote in message news:<59c6a934.0310181029.1ffcf5ed@.posting.google.com>...
> Hi
> There is not reason why this should not work, although if you are not
> part of the domain or on a trusted domain then you will probably have
> to use SQL authentication.
> I don't think a static IP is absolutely necessary, but it may be
> required by the firewall/router for authentication.
> John|||Hi
If you are not using the VPN and have access restricted to those connecting
though the VPN then anyone can connect!!
John
"Michael Holberton" <MikeTheBike@.tpgi.com.au> wrote in message
news:8a68c00d.0310200113.2586be5d@.posting.google.c om...
> Hi John,
> Thanks for your response. I couldn't set up a VPN connection but I was
> able to connect directly, using the IP Address, using Enterprise
> Manager. I had a brainwave earlier today and discovered I could also
> setup an ODBC connection using the IP Address and hence link to Tables
> from Access.
> Regards Michael
> jrm_bell@.hotmail.com (John Bell) wrote in message
news:<59c6a934.0310181029.1ffcf5ed@.posting.google.com>...
> > Hi
> > There is not reason why this should not work, although if you are not
> > part of the domain or on a trusted domain then you will probably have
> > to use SQL authentication.
> > I don't think a static IP is absolutely necessary, but it may be
> > required by the firewall/router for authentication.
> > John
Friday, February 24, 2012
.exe to insert data in SQLServer database
SQLServer database, I can do it in C, but how can I connect to SQLServer
and execute a query.
All data that I have to insert are data that I can have from PC
environment variables.
Thanks
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORGADO or ADO.NET is the API most commonly used to connect to SQLServer from
C++ and other languages. You can use the ADO Command object to execute any
SQL statement, including INSERT statements to insert new data. Lookup ADO in
SQL Server Books Online for some examples.
--
David Portas
SQL Server MVP
--|||Hi
There are various ways to do this if you want to look at a programming
language such as VB then check out the examples that come with the SQL
Server installation. If you want a simple way to do it then you could use
the osql/isql utilities that are shipped with SQL Server. Check out books
online for information on all of these things. An example using osql on the
command line to access environment variables:
C:\>set Name=Fred
C:\>echo %name%
Fred
C:\>osql -E -dTest -S"(local)" -Q"CREATE TABLE Tmp1 ( name varchar (20) )"
C:\>osql -E -dTest -S"(local)" -Q"INSERT INTO Tmp1 ( name ) VALUES (
'%Name%' )
"
(1 row affected)
C:\>osql -E -dTest -S"(local)" -Q"SELECT * FROM Tmp1 "
name
-------
Fred
(1 row affected)
You could also put this into a batch file.
If you are looking to import data in bulk then look at the bcp utitlity or
the BULK INSERT statement.
John
"Santo Santis" <santosanto@.supereva.it> wrote in message
news:94650d3133425f4d14afaeb82a2328e1.114479@.mygat e.mailgate.org...
> How can I make an .exe file that can insert data automatically in a
> SQLServer database, I can do it in C, but how can I connect to SQLServer
> and execute a query.
> All data that I have to insert are data that I can have from PC
> environment variables.
> Thanks
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Saturday, February 11, 2012
(ts Urgent) Connect to different databases
Hi
I have my database on four different database servers. I have a web appliction using asp.net 2.0. i want to add data to all four database servers. How can i do that with asp.net 2.0
Thanks in advance
Take care
Bye
In you web.config you can add all the connectionStrings to the section connectionStrings.
Then in your code, you can retrieve the relevant connectionString based on some condition to connect to the required database.
|||Hi
I really appreciate your response
Thanks for your reply
Take care
Bye
Thursday, February 9, 2012
(RDA)Accessing server via a port..
Hello,
I connect to the SQL Server with RDA method. there was no problem until I had to use a port to access the virtual path of RDA.
it connects when
rda.InternetUrl = http://ip/rdadir/sqlcesa30.dll ,
but no when
rda.InternetUrl = http://ip:81/rdadir/sqlcesa30.dll .
May someone help,please?
Thanks.
Can you connect via Internet Explorer to the above URL on port 81 from your client 8desktop or device)? If not, maybe a firewall or similar is prevent communication.|||
ErikEJ wrote:
Can you connect via Internet Explorer to the above URL on port 81 from your client 8desktop or device)? If not, maybe a firewall or similar is prevent communication.
I can browse sqlcesa30.dll via browser on the device successfully. but when I access via my program,it fails..altough the connection address is same as the address that I wrote to the browser on the device, it doesn't connect...so that means there's not firewall or something that prevents communication. am i wrong?|||What error messages are you getting, see here on how to get SQL CE error messages: http://msdn2.microsoft.com/en-us/library/ms174079(SQL.90).aspx
(provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
I am getting the following error when i try to connect to the my web site using froma different server.
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
i am using sql express and i attach the database through the connection string in the web config.
Any ideas
The error indicates the connection was eatablished but then closed for some reason, this can happen if the SQL2005 instance is out of the available connections when the instance is configured to use a nonzero maximum number of concurrent connections. Check the SQL ERRORLOGs for detailed information, which you can get by executing xp_readerrorlog in Management Studio. If you find something like "Could not connect because the maximum number of '5' user connections has already been reached.", you can execute such command:
sp_configure 'user connections',0