I€™m trying to create with a developer a program that uses an SQL Sever 2005 database on a local network.
When the program is first installed it asks for a clientID that it then sends back to our server over the internet to authenticate that it is allowed to run by matching a clientID in our database.
Does SQL Server have a unique identifier like a serial number or something that is totally unique to that sql server that we can send back to our database as a stamp during the initial install in order to prevent our program from running on other networks with the same ClientID?
Are there any good resources (books, websites, etc) for programming SQLServer using Visual C++? I am currently using C# but I really want to learnhow to do it using C++, but it appears to be much more difficult using C++.Thanks
I am currently working through an SQL Server book, and I am curious to know what programing language would be best to familiarize myself with if I become certified in SQL Server? Obviously SQL is important, but in addition to that... Visual Basic? VB.NET? ASP.NET
I have a VB.NET program which creates a Job (Microsoft.SqlServer.Management.Smo.Agent.Job) and schedules it, to load and run a existing SSIS package, which is on a different server.
I'm using the following assemblies for this purpose.
To make this application run in my application server, do i have to install any SQL server components or SSIS rumtime components? Or Is it enough if i copy only the above mentioned dlls to my applications bin directory, in my application?
Note: I have the enterprise edition of SQL Server 2005 installed on my database server.
where the job_type columIn is of the char(1) type, NTBSTRINGBIND is the vartype argument in the dbbind() function.
However, what I have gotten is nothing more than a null string from the job_type column. I have alternatively changed the vartype argument to STRINGBIND, CHARBIND and even INTBIND, but the results are the same.
Who can tell me the tricks to retrieve a char(1) column from SQL server?
Hi all, In the Object Explorer of my SQL Server 2005 Management Studio Express, I do not have €˜Northwind€™ Database installed yet. I executed the following source code (that was copied from a book) in my VB 2005 Express: /////////////////////----Form9.vb----////////////////////////// Imports System.Data.SqlClient Imports System.Data Public Class Form9
Dim cnn1 As New SqlConnection
Private Sub Form5_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Compute top-level project folder and use it as a prefix for 'the primary data file Dim int1 As Integer = InStr(My.Application.Info.DirectoryPath, "bin") Dim strPath As String = Microsoft.VisualBasic.Left(My.Application.Info.DirectoryPath, int1 - 1) Dim pdbfph As String = strPath & "northwnd.mdf" Dim cst As String = "Data Source=.sqlexpress;" & _ "Integrated Security=SSPI;" & _ "AttachDBFileName=" & pdbfph cnn1.ConnectionString = cst
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Create a command to create a table Dim cmd1 As New SqlCommand cmd1.CommandText = "CREATE TABLE FromExcel (" & _ "FirstName nvarchar(15), " & _ "LastName nvarchar(20), " & _ "PersonID int Not Null)" cmd1.Connection = cnn1
'Invoke the command Try cnn1.Open() cmd1.ExecuteNonQuery() MessageBox.Show("Command succeeded.", "Outcome", _ MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception MessageBox.Show(ex.Message) Finally cnn1.Close() End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Create a command to drop a table Dim cmd1 As New SqlCommand cmd1.CommandText = "DROP TABLE FromExcel" cmd1.Connection = cnn1
'Invoke the command Try cnn1.Open() cmd1.ExecuteNonQuery() MessageBox.Show("Command succeeded.", "Outcome", _ MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception MessageBox.Show(ex.Message) Finally cnn1.Close() End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Declare FromExcel Data Table and RowForExcel DataRow Dim FromExcel As New DataTable Dim RowForExcel As DataRow
'Create TextFieldParser for CSV file from spreadsheet Dim crd1 As Microsoft.VisualBasic.FileIO.TextFieldParser Dim strPath As String = _ Microsoft.VisualBasic.Left( _ My.Application.Info.DirectoryPath, _ InStr(My.Application.Info.DirectoryPath, "bin") - 1) crd1 = My.Computer.FileSystem.OpenTextFieldParser _ (My.Computer.FileSystem.CombinePath(strPath, "Book1.csv")) crd1.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited crd1.Delimiters = New String() {","}
'Loop through rows of CSV file and populate 'RowForExcel DataRow for adding to FromExcel 'Rows collection Dim currentRow As String() Do Until crd1.EndOfData Try currentRow = crd1.ReadFields() Dim currentField As String Dim int1 As Integer = 1 RowForExcel = FromExcel.NewRow For Each currentField In currentRow Select Case int1 Case 1 RowForExcel("FirstName") = currentField Case 2 RowForExcel("LastName") = currentField Case 3 RowForExcel("PersonID") = CInt(currentField) End Select int1 += 1 Next int1 = 1 FromExcel.Rows.Add(RowForExcel) RowForExcel = FromExcel.NewRow Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException MsgBox("Line " & ex.Message & _ "is not valid and will be skipped.") End Try Loop Try cnn1.Open() Using sqc1 As SqlBulkCopy = New SqlBulkCopy(cnn1) sqc1.DestinationTableName = "dbo.FromExcel" sqc1.WriteToServer(FromExcel) End Using Catch ex As Exception MessageBox.Show(ex.Message) Finally cnn1.Close() End Try
'Read the FromExcel table and display results in 'a message box Dim strQuery As String = "SELECT * " & _ "FROM dbo.FromExcel " Dim str1 As String = ""
Dim cmd1 As New SqlCommand(strQuery, cnn1) cnn1.Open() Dim rdr1 As SqlDataReader rdr1 = cmd1.ExecuteReader() Try While rdr1.Read() str1 += rdr1.GetString(0) & ", " & _ rdr1.GetString(1) & ", " & _ rdr1.GetSqlInt32(2).ToString & ControlChars.CrLf End While Finally rdr1.Close() cnn1.Close() End Try MessageBox.Show(str1, "FromExcel")
End Sub
End Class /////////////////////////////////////////////////////////////////////// This is Part 1 (The length of input exceeds 50000 characters). Part 2 will be posted in this site shortly.
What I want to do is remove part of a result from a query. I am selecting the srvname from sysservers as follows.
SELECT srvname from sysservers Where srvid ='0'
When the name is returned some times it might be like servernameinstance. What I need to do is cut off the and everything after that so that my result is just servername. I am then using this result in a cursor to go after server shares. The length of the servername varies. Any suggestions.
Hello: I'm scheduling DTS packages to run as a job but when I do that, the job siply does not works, someone tolds me that it's a problem with the SQL and Windows NT authentication and security and he gaves me this URL http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q269074. but it not so clear to me, i'm working with SQL Server 200 and Windows Server 2000.
Currently I am using the BCP functionality to import/export tables between different SQL Server 2005 databases. The process is working ok, but it creates alot of manual work, when 70 or more tables need to be transferred, every week. I am new to RMO development and am interested if the following may be possible.
- I would like to build an interface in VB.net allowing users to select a source database, and select the tables that need to be transferred from the Source DB, to the Destination DB.
-Put in place RMO funtionality to replicate the source database tables into flat files.
-Within the Vb.net app transfer the created flat files into the destination database.
I would greatly appreciate any advice on this, or if there may be a better approach at replacing the BCP functionality.
Need help from experts on web service (ReportingService class).
I am trying to change a datasourcereference of a report from one location to another location. I am kind of stuck at this point where i am able to get the location but only dataSource.Item, dataSource.Name are not enough items for me to solve this problem.
any possible help or any threads already answered these type, greatly appreciated.
Can anybody tell me the advantage and disadvantage to use NT security for SQL Server 7.0? For a corporation with 400 users, what is your recommendation for the SQL Server security management. Thanks.
Hi!I want some tutorials on how to actually program database applications. Everything seems so bound with the data controls provided by Visual Studio and coming from PHP I don't like to not have full control over my applications. So where can I learn about creating my own database applications without using repeater, gridview or formview?Thank you in advance!
I need to create a database with one table and its column names. I got this script from the query analyzer templates as a database basic template: IF EXISTS (SELECT * FROM master..sysdatabases WHERE name = N'<database_name, sysname, test_db>') DROP DATABASE <database_name, sysname, test_db> GO
CREATE DATABASE <database_name, sysname, test_db> GO
I am not sure what it all means, what I need to do it name the database a certain name each time. and then create one table with 6 column names.
Currently, I am running the code in an Access/VBA module through an ODBC connection, but I would like to be able to run all my code directly on the server.
Thanks in advance for any help you might be able to provide.
What do all of you use to create and edit stored procedures? I am looking for a better way to code than to use the default window supplied with Enterprise Manager.
Do most of you use the Query Analyzer? Are there third party products you like using better?
I am looking into a production geared software called MassGroup. (www.massgroup.com) It says that its FactoryServer builds are on a standardized SQL framework and web architecture for data collection, work order requests, reporting and asset management. My questions are:
1. Is SQL its own programming language? If not what is it? Answer: After going thru several pages and reading the fine print I discovered they use VB, ASP, COM technology, and Crystal Reports.
2. How powerful do you think this would be at gathering data and does it have the capability of creating a number sequence automatically? (example: 0001; 0002; 0003...)
Any help would be appreciated. Thank you in advance!!!!!
I have just started in Sql 6 months ago. I was an IT major in graduate school and am now in my late 30's (career change). It took me 4 years to finally get what I thought was my dream job. Well, I was promised training which I have yet to receive and bascially went from doing basic queries that I did in class in college to doing advance Sql - stored procs, etc. I completely hate it. I do not know if it is from the lack of training or if it just not for me. I am completely bored out of mind. I am also tired of struggling everyday to complete assignments. The first 2 assignments I received were way out of my league. I was told this by a project mgr who did a similiar assignment and they have years of sql experience and it took her 3 months with assistance to complete it. I have been with the company for almost 6 years. I am not sure if I should just complete my current assignments and ask if they can reassign me to a different IT department, look for a new job or just continue to struggle and pull my hair out. Please give me some feedback as to how you would handle this situation.
I need to know what exactly other languages [C#/VB.net/ADO/XML/ASP.net..etc] that I should learn in order for me to be able to excel in SQL Development.
I started getting my hands dirty with some SSIS / SSRS & SSAS, but inorder for me to handle situations such as [Find if file exist in ftp before loading, Checking a certain row of a data file before processing/ Zipping and Unzipping data files and etc...] What should I need to know well in order for me to add more value to my skills? I would like to learn 1 language and master it pretty well.What are your suggestions?
And what is this CLR that is being talked about ?Does it use other language besides SQL?
I know how to basically change SSIS variables from within a C#. NET winform application. But can anyone point me on how to change the contents of a connection manager SSIS connection from withing C#.net please. That is..how do i parameterize a connection manager connection to basically accept the connection information from within the winform app.
Hey, i have an installer that places ms sql express onto a machine. thats is fine. i want to create a post setup application that runs after ms sql server is installed. what for example i want to do is be able to create a user and have the DB allow remote connections. i can provide instructions for a 'peon' to make the required post setup changes but i want to see if i can cover that with an application. thanks
I am working on sql server integration services..New to this topic...I want to transfer data from flat file to sql database by doing it programatically.Creating source,destination and transform adapters
my basic question is should the source,transform and destination adapter be bulid for each file i am trying to transfer.
Not sure if this is right place to ask this. I have a table where I want a single field to show up in separate columns. (wow its hard to describe what I want. Here is an example
Store_Group_Product_Tbl store, group id, product
Let's say we have these records: Store 1 - group 1 - hats Store 1 - group 1 - clothes Store 1 - group 1 - shoes Store 1 - group 2 - drink Store 1 - group 2 - food
I want my select statement to return:
Store 1 - group 1 - hats - clothes - shoes Store 1 - group 2 - drink - food - NULL
(and in this case I will be selecting on where store = a selected store)
Is there a way to join it back to itself to get the data I want? Or will I have to select everything into an array and then manipulate that array to get everything columned up correctly?
I am trying to bring the data from Oracle to SQL Server. And, I need to write this in C#. All that I have is a source table in Oracle and a source table in SQL Server. I need to have some samples.
I am working on Sql Server 7.0 with a group of Visual Basic programmers that have made the following request:
1.They want all decimals/integer fields in the database to default to 0(zero). Is there an way to do this for all fields instead of on an individual basis? 2.They don't want a null returned on any character string field.
What is the best way to take care of these 2 requests? Thanks in advance. Karen Suenram