Looking To Write My Own Simple SQL Client Via TCP/IP

Jan 16, 2007

I'm looking to write my own simple SQL Client via TCP/IP. We have some hardware that does not run an OS of sorts, but I can create TCP Connectons. We's like to be able to Query our SQL Server with this hardware.

The SQL Servers we are talking to are MS SQL2000 and MS SQL 2005 both via TCP port 1433. We can telnet to the port of the SQL Server. Any resources to the SQL Protocol you could pass along would be great.

Thank you,
Scott<-

View 4 Replies


ADVERTISEMENT

Can Anyone Write A Simple Query To Search For NULLs

Apr 30, 2008



Hello ALl, can anyone please tell me how to search for NULLS.

like i know one method....

select * from table
where col = 'NULL'

View 1 Replies View Related

How To Write A Simple, Accurate Stored Proc Timer?

Oct 25, 2006

I want to test some times it takes for a proc to run.  Since I work for a large company, I rarely have access to the SQL server in a capacity where I can use profiler and such. Are there any quick and easy ways to just surround blocks of code in a T-SQL statement to get an accurate reading on how long it takes?I.e., if I surround with GETDATE() before and after, does that also measure the round trips to the server, or just the execution time.I want to just compare some different methods and see what is quicker. THX.

View 4 Replies View Related

Is It Possible To Use A Simple ODBC Config On A Unix Client To Connect To MS-SQL Server?

Jul 20, 2005

Anyone support a config where you have an unix/linux (AIX here) ODBCclient connection to SQL Server database? I am looking for a simple,supportable configuration that does not require me to learn perl orinstal a bunch of crap gnu shareware on enterprise class machines.Please help!

View 3 Replies View Related

Client With Tcp/ip Produce &#34;time Out Error&#34; While Same Client While Switced To Named Pipes

May 28, 2001

We have 15 clients running our applicaton
14 of then conected to SQL server using TCP/IP and it runs fine

1 of 15 when connected using TCP/IP produce "..Time out error "
but runs fine when swiched from TCP/IP to Named pipes

1.What area should we look to correct problem with Time out using TCP/IP ?
2. Where to get information about using TCP/IP via Named pipes ?

View 1 Replies View Related

Install SQL Server2005 Error:[Native Client]Encryption Not Supported On The Client

May 10, 2006

Product: Microsoft SQL Server 2005 -- Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Encryption not supported on the client. Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.

View 78 Replies View Related

Client Unable To Establish Connection Encryption Not Supported On SQL Server. (Microsoft SQL Native Client)

May 2, 2006

On Windows XP systems I get the following issue when trying to browse the MSDB folder in SSIS

Client unable to establish connection
Encryption not supported on SQL Server. (Microsoft SQL Native Client)

I have noticed another post where several others have noticed the same issue. It appears to only occur on Windows XP installations. Is there a workaround or fix for this?

View 2 Replies View Related

Setup Error : [SQL Native Client] Encryption Not Supported On The Client

Nov 1, 2006

Hi,

I have SQL2000 installed as the default instance, and now I'm trying to install SQL 2005 standard edition as a named instance.

I receive this error :
SQL Server could not connect to database service for server configuration.. [SQL Native client] Encryption not supported on the client. However I'm able to install client tools

The setup works fine on other box with the same config : SQL 2000/Windows XP, is there any work around for this issue ?

In my SQL 2000 client network utilty "Force proctocol encryption " is desabled and did not find the setting for SQL 2005 !

Thank you

View 1 Replies View Related

Upgrade Client Connectiviity Tools On Client Machines

Jul 23, 2005

Hello,Is it necessary to upgrade the Client Connectivity Tools on all clientmachines after the SQL Server database server is upgraded from Version7.0 to 2000?Thank you in advance!Eddy

View 1 Replies View Related

Backup Master Key, Cannot Write Into File 'c: Empmaster'. Verify That You Have Write Permissions, That The File Path Is Valid.

Jul 12, 2006

Hi,



I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c: empmaster' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c: empmaster'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?



Regards,

Tarek Ghazali

SQL Server MVP

View 12 Replies View Related

Simple Simple Linking Tables & Perform Calculation

Mar 22, 2007

found it

View 3 Replies View Related

Simple Question (Hope Simple Answer Too)

May 26, 2004

Hey,

I have MS SQL database.
I have procedure:



code:--------------------------------------------------------------------------------
CREATE PROCEDURE dbo.Reg_DropTable
@ModuleId varchar(10)
AS
declare @TableName varchar, @kiek numeric
set @TableName = 'reg_'+@ModuleId

begin
DROP TABLE @TableName <- HERE I GOT ERROR
end
GO
--------------------------------------------------------------------------------


I got error when using variable with tables names.
How to do this?

Ps. Number is send to this function and it must drop table with name Reg_[That number]

View 1 Replies View Related

Sql Native Client Or Sqlserver Client

Mar 3, 2007

Hi,

While using Sql Native Client ,VB Application giving error

"Transcation Cannot Start because more than one ODBC connection is in use"

But when useing SqlServer client then work perfectly ok.

Please guide where to use Sql Native Client.

Thanks

Rizwan



View 1 Replies View Related

SQL NATIVE CLIENT - OLE DB Connection On 64 Bit Client

Apr 23, 2008

I have tried this on several different operating systems (VISTA and XP ) and several versions of SQL NATIVE CLIENT including 2005.90.3042.0

I have a 64 bit "SQL NATIVE CLIENT" connection that fails. The exact same connection and code succeeds on 32 bit.
My customer and I prepend "oledb:" to the connection string and it starts working.

FAILS on 64 bit:
Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Wrigley_Test;Data Source=MONGO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RIPTIDE;Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False

WORKS
oledb:Provider=SQLNCLI.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Wrigley_Test;Data Source=MONGO;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=RIPTIDE;Use Encryption for Data=False;Tag with column collation when possible=False;MARS Connection=False;DataTypeCompatibility=0;Trust Server Certificate=False

I debugged my code to the point that I know it is happening when I call CreateAccessor for my SQL statement.


m_hr=m_pIAccessor->CreateAccessor(DBACCESSOR_ROWDATA, GetCols(), (m_pDBBinds+IsBookmarked()), 0, &m_hAccessor, NULL);

Error:

Microsoft SQL Native Client: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Does anyone have any suggestions?

View 6 Replies View Related

Simple Join Not So Simple

Feb 21, 2007

I am receiving funny results from a query. To simplify, I have 2 tables (todayyesterday). Each tbl has the same 8 columns. My query joins the two tables then looks where either of two columns has changed. What is happening is that when checking one of the columns it seems as though sql is flipping the column, causing it to be returned in error.

result set

colA colB colC colD colE colF colG colG (from yesterday)
1 1 a b c d e m
1 1 a b c d m e

So what's happening is that the record above is actually the same record and should not be returned. There is a daily pmt column that changes but I am not using that in the query. Aside from that the two records are identicle.

Any help is appreciated.

View 7 Replies View Related

Simple Join Not So Simple

Aug 19, 2006

Hi,

I have the following situation (with a site that already works and i cannot modify the database architecture and following CrossRef tables -- you will see what i mean by CrossRef tables below)

I have:


Master table Hotel

table AddressCrossRef (with: RefID = Hotel.ID, RefType = 'Hotel', AddrID)
joins
table Address (key = AddrID)


table MediaCrossRef (with RefID = Hotel.ID, RefType= 'Hotel', MediaID)
joins
table Media (with MediaID,mediaType = 'thumbnail')


foreach hotel, there definitely is a crossRef entry in AddressCrossRef and Address tables respectively (since every hotel has an address)

however not all hotels have thumbnail image

hence i have hotel inner join AddressXReff inner join Address ..... however i must have
left outer join mediaXref left outer join media


the problem is that if there is no entry in Media or mediaXref, I don't get any results

i tried to get over it by using
where (media.mediaTyple like 'thumbnail' or media.mediaType is null)
but then i started getting multiple results for each hotel because media's of type movie or full_image or etc... all got returned


any clue?

thanks

View 5 Replies View Related

How To Write This SQL

Jul 27, 2006

I have a table T1
ID Desc
1 aaaa
1 bbbb
1 cccc
2 aaaa
2 cccc
3 cccc
 
Now, I need to group by ID and make Desc column as follows in a new table
ID Desc
1 aaaa, bbbb, cccc
2 aaaa, cccc
3 cccc
 
How can I do this?
 

View 2 Replies View Related

How To Write This Sql

Jul 28, 2006

I have table T1 with fields T1.ID, T1.CheckBoxCol
 
The T2 tabel has the same ID as T2.ID and T2.CheckBox1, T2.CheckBox2, T2. CheckBox3
 
Now, I need to check T1 and
if T1.CheckBoxCol=1 then set T2.CheckBox1=1
else if T1.CheckBoxCol=2 then set T2.CheckBox2=1
else if T1.CheckBoxCol=3 then set T2.CheckBox3=1
 
for each T1.ID
 
How can I do this?
 

View 2 Replies View Related

How To Write This

Jan 1, 2007

Hello,
I have MyTable with ID, IsYesNo fields
ID is duplicated so I need perform select on MyTable with the following conditions:
1. Select all the ID distinct where IsYesNo=’Yes’ first
2. Then select all the ID distinct where IsYesNo=’No’ if ID is not in the first selection
Combine these two and return the result
 

View 1 Replies View Related

How To Write To SQL

Apr 29, 2007

I'm sure this is really basic. I've created a simple form that on submittal, I would like the text boxes to be submitted to the database. I have successfully created the Datasource and it connects ok, but what code would i use to submit one text box for email address and a simple submit button. Is there an easy way to do this with VWDE?
 Thanks

View 5 Replies View Related

Need Help To Write SQL

Aug 29, 2007

Hi,I
have a hotel reservation system.I need to implement Check availability
(Room checking) function for the project.But I dont understand how do I
start and write SQL for this.Here is table structureTblRooms------------RoomsIDRoomNameNoteunitPriceSeasonalOffersTblReservation----------------ReservationIDArrivalDateDepartureDateArrivalFromFlightNoPurposeOfVisitTblRoomsInventory-------------------RoomsInventoryIDTotalRoomsBookedRooms Should I add more fields or table to implement this or this is enough .please any body can help me 

View 2 Replies View Related

How To Write This SQL

Sep 14, 2007

 How to write this SQLSelectCommand="SELECT DISTINCT TblOrder.CustomerUID, TblOrder.OrderHiddenID, TblPayment.PaymentAmount, TblPayment.Result, TblOrder.OrderID FROM TblOrder CROSS JOIN TblPayment WHERE (TblOrder.CustomerUID = @IsCustomerID) AND (TblOrder.OrderHiddenID = @IsHiddenID) AND (TblPayment.Result = 'Pending')"How to get latest order id from this.I need to combine it with above sql.I mean i want to select above records but based on max orderid record.such as select latest records from ....above SQL where max orderid

View 2 Replies View Related

How To Write This?

Jul 7, 2004

I need to compare two column in two different tables but I do not know how to write this query.

Example:


Table1
-------------
EmployeeSSN
EmployeePayRate

Table2
-------------
EmployeeSSN
EmployeePayRate

I need the result set to look like this

Result Set

-----------------------------------------------------
EmployeeSSN T1Rate T2Rate Same?
-----------------------------------------------------
111-11-1111 8.95 8.95 True
222-22-2222 9.95 8.95 False
333-33-3333 8.95 NoMatch False
444-44-4444 NoMatch 8.95 False

and so on....

How do I write this in Transact-SQL also using a function to return the "NoMatch" and True or False statements?

Thanks,
Roger

View 1 Replies View Related

Hot To Write This SP

May 9, 2002

Hey all.. Sorry I have never written a SP in my life.
so this would be a newbie question for sure.
Using sql server 7.

Here is my table field setup with sample values all fields are numeric
except date

weekending size effic dailycap workdays planutil demand
variance
5/172002 8 80 85 5 244
102 142

A file with source data will be made available in comma delimitted format to
supply a new weekending value, size and demand.

What I will need is first the dts to bring that in. then I am assuming a
stored procedure to be run (this is why I am here)
to add the data from the comma del. file into the table. If the data EXISTS
I would want it to UPDATE the values that are in the dest table but run a
calculation first which would be the planutil minus demand then the result to
be updated intot the record.
if the record from the tab del. file does not exisst in the dest table then
insert it.


another words the logic i have in mind
read the data from the temp tample (where the file gets imported into)
see if the record exists in the live table is it does update it with the calculation of planutil minus demand
if not create the new record in the live table.
I need it to compare..

Someone help me with some code
i thank you kindly in advance

p.s. And good books dedicated to stored procedures??

View 3 Replies View Related

Help To Write A Qry

Dec 1, 2006

Many thanks in advance for anyone that can help me write this qry:

To summarise - we have a database that links components to services. Components can have a 1 to many relationship with services. The components are held in a table:

dbo.components

compID compName compType
1 srv1 1
2 srv2 1
3 srv3 1

We also have a services table which hold all our various services we own:

dbo.services

svcID svcName
1052 svc1
1053 svc2
1054 svc3

We then have a tbl that shows the links between components and services

dbo.compUses

svcID compID
1052 310
1052 400
1053 122
1256 134

I would like to find out through the qry what components are currently NOT linked to a service. This will allow me to find out what components have no relationships.

This is in SQL2005.

Have I explained this well enough? Any help would be much appreciated!

View 1 Replies View Related

SQL To Write?

Dec 9, 2005

Hey peeps, fishkake's back, and he's more clueless than ever!

OK, after a few days of wrestling with books and experimenting, I now know all about reading SQL. Well, what that means is I understand Select From Where etc etc.

How do I write data? I have a reference guide, if somebody could give me literally a few high-level commands that are to do with writing data in a similar way to reading it with the SELECT statement, it would be very helpful...

This site is just making me lazy now...

View 10 Replies View Related

How Do I Write This

Apr 15, 2008

Good Afternoon all,
I was wondering how to write the TOP 5 records using Relational Algebra.

Dallr

View 6 Replies View Related

Best Way To Write This

Nov 29, 2007

Hi,
I have to implement a search functionality. In the various filters for the search, Store Number is one such filter.
The user should be able to enter range values for store numbers.
Like 1500-1600. So this should filter for all the stores between 1500 and 1600.
Similarly, all these also should be valid.
1550,1600
1550
1550 - 1580,6000,8000
etc.
I have function which identifies the commas or dashes and seperates out the store number and returns a string like
Stores.Storenumber in(1555,1600)
Store.StoreNumber between 1555 and 1600 etc...
i generate a sql at run time and append this piece and then execute the sql.
I have one of the query below.

declare @strQuery varchar(max)
declare @strConcat varchar(10)
declare @strAppend varchar(max)
set @strAppend=''
set @StrConcat ='And '

if @IsAdmin is null-- Not a Admin
set @StoreId =(select StoreNumber from Stores where Store_Id = @StoreId)

set @strQuery='
Select
(Select StoreNumber from Stores where Store_id=d.DestinationId) as StoreNumber,
CartonNumber,
ActualReceiptDate as [Scan Date],
isnull(Sum(QtyShipped),0) as [Total Units],
b.BatchNumber
from
Carton c
left outer join
CartonDetail Cd on Cd.Carton_Id = c.Carton_ID
inner join Batch b on b.General_Id = c.Carton_Id and b.BatchType=''Warehouse'' and b.TranTable=''Carton''
inner join Document d on d.Document_ID = c.document_Id
inner join Stores st on st.Store_ID = d.SourceID and st.StoreType =5
inner join Stores on Stores.Store_ID = d.DestinationID
inner join Codelist cl on cl.Codelist_Id = c.CartonStatus_ID
inner join Codes on Codes.Code_ID = cl.Code_id and Codes.CodeType=''Cartons Status Code''
where not c.cartonNumber is null '

if not (@StoreId) is null
begin
set @strAppend = @strConcat + '(' + dbo.DecodeStoreNo(@StoreId) + ')'
End

if not (@DateFrom) is null and not (@DateTo) is null
begin
set @strAppend = @strAppend + @strConcat + '(convert(varchar(50),c.ActualReceiptDate,101) between ''' + @DateFrom + ''' and ''' + @DateTo + ''')'
End

if not (@CartonNumber) is null
Begin
set @strAppend = @strAppend + @strConcat + '(c.CartonNumber = ''' + cast(@CartonNumber as varchar) + ''')'
End

if not (@Status) is null
Begin
set @strAppend = @strAppend + @strConcat + '(cl.Codevalue = ''' + @Status + ''')'
End


set @strAppend = @strAppend + ' group by
d.DestinationId,CartonNumber , ActualReceiptDate , b.batchnumber
order by ActualReceiptDate'

set @strQuery = @strQuery +@strAppend
execute(@strQuery)
This query takes time, if there a little over 1000 records.
I wanted to know, if there is any way to optimize this query? or any other way in which the above can be accomplished.

I hope i was able to explain my query fairly. Please let me know otherwise.

Thanks
Renu.

View 1 Replies View Related

How To Write An UDF And Run It

Mar 25, 2008

how to write an UDF and run it

View 2 Replies View Related

How To Write Log?

Mar 5, 2007

Hi There,

I have been working in ssis and i have a task to write a log of the all events in daily basis.

I mean writing a log for the entire package for each tasks.

Can some one help me how to do it?

Thanks



View 1 Replies View Related

How To Write This?

Nov 15, 2007



Hello all!
I'm triyng to update a NULL value to another value. I know I can do this, just can't seem to write it out right.

Something like
UPDATE Part_Order
SET Ser = 'NA'
WHERE Ser isnull

I know thats not right, but I know I'm close.
Any hints?

TIA!

Rudy

View 5 Replies View Related

How To Write This Sql

Jul 28, 2006

I have table T1 with fields T1.ID, T1.CheckBoxCol

The T2 tabel has the same ID as T2.ID and T2.CheckBox1, T2.CheckBox2, T2. CheckBox3

Now, I need to check T1 and
if T1.CheckBoxCol=1 then set T2.CheckBox1=1
else if T1.CheckBoxCol=2 then set T2.CheckBox2=1
else if T1.CheckBoxCol=3 then set T2.CheckBox3=1

for each T1.ID

How can I do this?

View 4 Replies View Related

How To Write This SQL

Jul 27, 2006

I have a table T1
ID Desc
1 aaaa
1 bbbb
1 cccc
2 aaaa
2 cccc
3 cccc

Now, I need to group by ID and make Desc column as follows in a new table
ID Desc
1 aaaa, bbbb, cccc
2 aaaa, cccc
3 cccc

How can I do this?

View 4 Replies View Related







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