Friday, March 30, 2012
Need to Connect to SQL Server via TCP - Resources?
protocol used to communicate to the Server via port 1433.
Any info would be helpful...
Thank you,
Scott<-Hi
SQL Server uses TDS (Tabular Data Stream). The on-the-wire protocol details
are available to 3rd party vendors, but there is no public documentation of
it.
Regards
Michel Epprecht
This posting is provided "AS IS" with no warranties, and confers no rights.
"Scott Townsend" <scott-i@..-N0-SPAMplease.enm.com> wrote in message
news:O1Ha12ROHHA.3668@.TK2MSFTNGP02.phx.gbl...
>I need to create my own SQL Client and am looking for resources on the
>protocol used to communicate to the Server via port 1433.
> Any info would be helpful...
> Thank you,
> Scott<-
>
Monday, March 26, 2012
Need suggestions on best way
using MSDE2000. I need the PCs to replicate with a SQL
server via modem to pick up subscription and exchange
data. What is the best way to accomplish this? Currently
I am using MOBSYNC and scheduleing the event. It has been
unreliable.
connect to your subscriber, go to the management folder and look in the jobs
there. You should find your merge agent there. You can examine its history
there.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Robert" <anonymous@.discussions.microsoft.com> wrote in message
news:810401c495a5$a8170580$a501280a@.phx.gbl...[vbcol=seagreen]
> Here is alittle background. The PCs are WINXP Pro. The
> PCs are schedule within MOBSYNC to once a week dial up a
> RAS server in Dallas, authenicate, and then replicate. My
> issues are as follow. I use the same username and
> password to authenicate on every PC. Each PC is scheduled
> to this function when no other is. Every 30 minutes
> starting at night across the US, a different PC is set to
> replicate. Some PCs indicate that they ran the process
> when looking at MOBSYNC, but the server says it didn't.
> It is difficult to check the RAS server to verifiy it
> connected because of the userid being the same and time
> zone differences.
Monday, March 12, 2012
Need Query Help for Search
I am writing a small search feature to return a list of companies whose name "Begins with" a certain string (up to 5 chars) provided by the user via a textbox. I want the results to only return results that begin with the letter/letters specified. Below I will put the code that I came up with that isn't working quite how I expected. I am new to this so any assistance and short explanation would be very much apperciated.
sql="SELECT distinct cm.cmmst_id, cm.cm_compno, cm.cm_cname1 + ' ' + cm.cm_cname2 AS cm_cname1, cm_tele, cm_fax, cm_s16 "
sql=sql & "FROM cmmst cm "
sql=sql & "WHERE cm_cname1 + ' ' + cm_cname2 LIKE '%" companyNameBegins,"'","''") & "%' " sql=sql & "AND (cm_mbtyp='M' OR cm_mbtyp='SUBDIV') " sql=sql & "ORDER BY cm_s16 DESC, cm_cname1 ASC"
companyNameBegins is the string passed in by the user
Thanks,
Zoop
(1) Use parameterized Queries. Your code will look simpler and neater and you can avoid SQL Injection Attacks (Google for more info on this topic)
(2) Append the "%" in the value rather than in the SQL. Also if you want to retrieve records starting with a value the % should be at the end like "SELECT...WHERE column like 'startwith%'"
Here's some sample code:
Dim myCommand As SqlCommand
Dim myParam As SqlParameter
myCommand = New SqlCommand()
myCommand.Connection = objcon
myCommand.CommandText = "SELECT distinct cm.cmmst_id, cm.cm_compno, cm.cm_cname1 + ' ' + cm.cm_cname2 AS cm_cname1, cm_tele, cm_fax, cm_s16 FROM cmmst cm WHERE cm_cname1 + ' ' + cm_cname2 LIKE @.companyNameBegins AND (cm_mbtyp='M' OR cm_mbtyp='SUBDIV') ORDER BY cm_s16 DESC, cm_cname1 ASC"
myCommand.Parameters.Add(New SqlParameter("@.companyNameBegins ",SqlDbType.varchar,100))
myCommand.Parameters("@.companyNameBegins").Value = companyNameBegins & "%"
Try
If objCon.State = 0 Then objCon.Open()
'ExecuteReader and fill some dataContainer.
Catch exc As Exception
Response.Write(exc)
Finally
If objCon.State = ConnectionState.Open Then
objCon.Close()
End If
End Try
|||
Thanks for the assistance, much smoother this way.
zoop
Friday, March 9, 2012
Need NT & SQL loginNames for Server & DB roles
Server 2000. We will be upgrading in the next 3 months to 2005 on both, so I
need this question answered for both databases.
How do I pull permissions & fixed roles for all mapped NT accounts?
I can find the many of the names in Syslogins mapped to their default
databases, but it doesn't give me a list of ALL the dbs the Login has access
to. Also, when I go to <dbname>.dbo.SysUsers, it will give me the list of
people who specifically have access to that database, but not what DB roles
that might have.
What am I missing? I need a comprehensive list of these permissions on our
database.
The report format we're going with is:
<ServerName>
<DatabaseName>
<ServerLogin> <Server or App Roles belonging to Login>
<Database logins>
<Database Roles>
<Table/View/SP/UDF permissions>
Thanks for any suggestions or help anyone can give me on this!
Catadmin
--
MCDBA, MCSA
Random Thoughts: "First things first, but not necessarily in that order."
-- Doctor WhoI'd ask this in one of the other SQL Server newsgroups.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Catadmin" <goldpetalgraphics@.yahoo.com> wrote in message
news:9F07D7A9-F2A0-4956-9E78-699143248F2C@.microsoft.com...
> I'm creating a SOX compliance report in Reporting Services 2000 via SQL
> Server 2000. We will be upgrading in the next 3 months to 2005 on both,
> so I
> need this question answered for both databases.
> How do I pull permissions & fixed roles for all mapped NT accounts?
> I can find the many of the names in Syslogins mapped to their default
> databases, but it doesn't give me a list of ALL the dbs the Login has
> access
> to. Also, when I go to <dbname>.dbo.SysUsers, it will give me the list of
> people who specifically have access to that database, but not what DB
> roles
> that might have.
> What am I missing? I need a comprehensive list of these permissions on
> our
> database.
> The report format we're going with is:
> <ServerName>
> <DatabaseName>
> <ServerLogin> <Server or App Roles belonging to Login>
> <Database logins>
> <Database Roles>
> <Table/View/SP/UDF permissions>
> Thanks for any suggestions or help anyone can give me on this!
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: "First things first, but not necessarily in that order."
> -- Doctor Who
>