I'm currently working on an application that needs to store address information.
I figured a database of some sort would be the perfect thing to use.
The thing is:
The application will work locally, there will be no server running on a network
There shouldn't be any login and password protection for the db
When I later on install the application on a computer, a fresh and clean db should be created within the applications folde
How can I create and access a db like that using c# and MS SQL Server?
Any hints, tips, example code, links...anything?
Many thanks in advance!!!
PS. I've been working some with visual c# express and recently installed SQL Server & Manager. I've previusly made some php web pages using MySQL but I´m a total noob when it comes to working with SQL and c# (= I'm stuck!).
I need to be able to run a DTS package from a computer that doesn't have any SQL tools on it. What do I need to copy over to that machine to do so? dtsrun.exe, dll's, etc. Thanks
What Does the "SQL" Stand for? I am just starting to teach myself Visual Studio Programing and some other applications. I can build any computer system that is out there and I have; So I think it is now time for me to study modern programing.
I started waching the Visual LESSONS, provided by Microsoft and I must say "Programing has come a long way since Micosoft (BASICA) and (DOS)"..... I am very enthusiastic about the new wave Software laguages....
Computing has been my hobby as well as a outstanding educational tool, I feel that what makes it so great is that you can spend all you life working or playing with them and NEVER reach and end.... So as a retired Machine and ToolMaker I will lean a new field at my own pace.... And Who Knows????????????
Thank you All......... ToolMan59........ Long Life And Good Health to All.......
Does anyone know what aspnet_regsql.exe requires to run stand-alone? I have to apply the .NET 2.0 Management/Role API to a sql2000 database on a machine that does not have the .net 2.0 framework installed.
Here is the scenario: We have an existing production non clustered SQL 2000 server instance that we need to migrate to a new clustered SQL 2000 server instance. We need to accomplish this without affecting the FQDN that applications use to call this server. I found this article on a solution to rename the server after an xcopy of the entire db structure. Here is the link http://vyaskn.tripod.com/moving_sql_server.htm. The other issue that we are trying to resolve is the time it takes for the snapshots of replication to run (in our case almost a full day). That is why this approach looked like it may be a good solution for us.
Here is the question: Is it possible to move our existing database to a new clustered environment without having to change the FQDN that other applications use to access this database and without having to reinitialize replication?
Can I have warm stand by database on SQL 2000 Server.The source server will be SQL 7.0. In another words can i shipp transaction logs from SQL 7.0 and make Warm stand by on SQL 2000 with SQL 7.0 full and transaction log backups Thanks Mike
I have a sql server db that works fine when I connect via the internet and from the network, but when I try to connect after disconnecting from the network it doesn't find the database (even though the sql server db is on the machine I am using after disconnecting, of course).
Is there something wrong with my connection string? Could it be the Windows/SQL Server/Mixed Authentication mode?
Maybe the best question I could ask is, if I want to run sql server as a web back-end, as a network utility, and as a local db for a windows app, how should I have it set up from a security/authentication standpoint?
My management ask me use logshipping in the part of Disaster Recovery plan,as per i know i have put target database in STAND BY mode in logshipping if ACTIVE MODE fail's how can i bring back the logshipped DB to active
Our production server is currently running SQL 2005 on a stand alone machine. SQL Server is installed as a default instance.
Can we upgrade to a cluster without having to change the instance name i.e currently applications connect to this server with hostname of the server i.e SERVERA, can we install a cluster such that sql server can still be called SERVERA.
lSQL = "SELECT * FROM OPENQUERY(liorder,'SELECT a.KF_ORDER_NO AS OrdNo, f.KU_NAME AS Customer, " & _ "a.KF_ORDER_POS AS Pos, a.KF_SCHEIB_NR AS Pane, a.KF_QTY AS Qty, d.BREITE*d.HOEHE/1000*a.KF_QTY AS SQM, " & _ "a.KF_QTY*d.SUM_NETTO AS Val, a.KF_FERT_QTY AS Done, d.BREITE*d.HOEHE/1000*a.KF_FERT_QTY AS DoneSQM, " & _ "a.KF_FERT_QTY*d.SUM_NETTO AS DoneVal FROM LIORDER.AUF_KOPF c, LIPROD.KAPA_AUS_FERT a, LIORDER.KUST_ADR f, " & _ "LIORDER.AUF_POS d WHERE (f.KU_VK_EK = 0) AND (a.KF_SCHR_NR = 12) AND (c.AUF_NR = a.KF_ORDER_NO) AND " & _ "(c.KUNR = f.KU_NR) AND (a.KF_ORDER_NO = d.AUF_NR) AND (a.KF_ORDER_POS = d.AUF_POS) AND (f.KU_NAME IS NOT NULL) " & _ "GROUP BY a.KF_ORDER_NO, f.KU_NAME, a.KF_ORDER_POS, a.KF_SCHEIB_NR, a.KF_QTY, d.BREITE, d.HOEHE, a.KF_FERT_QTY, d.SUM_NETTO')" Set RS = New ADODB.Recordset RS.Open lSQL, DB
Do While Not RS.EOF Select Case RS!Pane Case "0" Or "1" glassSQL = "SELECT IDNR, GL_BEZ FROM OPENQUERY(liorder, 'SELECT a.IDNR, a.GL_BEZ FROM LIORDER.GLAS_DATEN a, LIORDER.AUF_POS b " & _ "WHERE a.IDNR = b.GLAS1 AND b.AUF_NR = " & RS!OrdNo & " AND b.AUF_POS = " & RS!Pos & "')" Set glassRS = New ADODB.Recordset glassRS.Open glassSQL, DB
Mike writes "I have a string, >!~[99DC# 4.12$2251.% 1.63& 3.58'2150.(-2050.>/~]
and I would like to extract parts of it and send it to a SQL database. here is the layout and data that should be in each column. The Data column will be filled in automatically, but once that happens I would like the other columns to get their data from the Data column.
Data = >!~[99DC# 4.12$2251.% 1.63& 3.58'2150.(-2050.>/~] Display_Address = 99 CE = 4.12 TPK = 2251 Si= 1.63 C = 3.58 TPL = 2150 TPS = 2050
/* hi people im doing a task and im not sure about some things. could u check if what im doing is good plz.*/
The task is: Produce a list of all female employees who earn more than the average salary of the male employees in the company. Display employee number, first name and last name.
The table: emp Attributes: EMPNO, FIRSTNAME, LASTNAME, SEX, SALARY
What i came up with: selectempno, firstname, lastname fromemp whereavg(salary)>any(selectavg(salary) fromemp wheresex='M') group by sex havingsex = 'F'
Here is my code to connect, any help would be appreciated. I am a total noob at this.
############### Code
<?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="orderofb_test"; // Database name $tbl_name="orderofb_test.members"; // Table name
// Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from signup form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword'];
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql);
// Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:login_success.php"); } else { echo "Wrong Username or Password"; } ?>
This is the error message I receive.
############### Code
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/orderofb/public_html/php/checklogin.php on line 11 cannot connect
I changed all the permissons to 777 and I still receive this error.
$tbl_name="orderofb_test.members"; // Table name
Is this the correct table name? Here is a pic of my phpmyadmin
Can SQL Server 7.0 be installed on a laptop as a stand-alone run-time application (using a VB front-end application)? Is it necessary to use MS Access as a gateway, or can SQL Server 7.0 really stand on its own?
Hello everybody . I have 40 GB db running mostly transaction processing. I set up 1. back full backup 2 times a day (takes 30 -40 min) 2. log backup every 15 min 3. custom log shipping 4. We don't won't use Cluster.
Once in while becouse of nethwork, or other problem log shipping fails, so I have to restart log shipping all over starting from restore in stand by mode last full back of my db.IT takes 2-3 hrs just to do this restore !!!
1. So I am asking advice is any way I do restore in less time ? 2. Should diffrential backup be taken ? 3. We will not use Custer
Does MSDTC auto-install with the plain vanilla version of SQL Enterprise? Or do I have to install it later?Do you know of any links that reference specifically SQL 2012 stand-alone server installs of MSDTC?
Hi,I'm looking for stand alone installation for SQL server Client tools,or the files required for creating such an installation. I would liketo include this installation as part of the setup for my ownSQL-dependant app. Any assistance would be greatly appreciated.
I am moving all of our SSIS packages from a stand alone server to a clustered environment. The old server ran Enterprise Edition, the new server runs Enterprise Edition 64 bit.
One package on the new server is giving me the error messaage DTS_PRODUCTLEVELTOLOW when run from a job. The package is stored in MSDB
I went back to the server and ran the following with the following results.
- Connected to SSIS from Management Studio on my desktop and ran the package and got the same error message.
- Did the same as above but was connected to the server through Remote Desktop and it ran fine
- Ran the job, which just runs the package and it ran fine
I have a SQL 2008 R2 2 node cluster. For DR testing, I need to restore an instance on a new server (completely isolated). The existing instance runs on what I would call an alias. The actual cluster host name is SQLPROD (cluster nodes are SQL01 and SQL02). The instance runs on server SQLPROD-APPLE. The instance is called APPLE. In production, I use SQL Management Studio and I connect to SQLPROD-APPLEAPPLE.
I've setup a new VM to run SQL. Not a cluster. Host name is SQLREC. The new Vm has all the IP addresses that were on the cluster and the DNS for all the aliases are correct. I've installed instance APPLE. I created an alias called SQLPROD-APPLE. When I try to open SQL Management Studio and connect, I can't connect to SQLPROD-APPLEAPPLE. I can connect to localhostAPPLE, SQLRECAPPLE, 192.168.168.50APPLE.
When I attempt to connect to the alias I get error 18452. Pinging the alias resolves correctly. I haven't gotten to the database restore yet, so that's not a concern. I'm just trying to validate the connection first with the correct server and instance names.
I have two stand-alone recordsets. They have the exactly the same fields definitions. They come from different ADODB connections (Microsoft Jet). And I cannot merge them into one recordset.
I was trying to merge the second recordset into the first, but instead of adding the records, the first recordset becomes populated with infinite copies of the first record of the second recordset. This seems to me a VB6 bug.
Any help on how to go around this problem will be really appreciated. Thanks a lot. Frank
This is the code:
(Please note, the INVENTORY table contains different data but has the same structure in both databases.)
I've computer with 2 databases (one SQL server instance). Between databases I set server broker. If the computer is disconnected from a net (restarted when it was disconected from a net). Service Broker can not send messages from one database to another.
This is my endpoint: CREATE ENDPOINT [FPRSOSSBEndpoint] AUTHORIZATION [fp] -- fp is a user&login STATE=STARTED AS TCP (LISTENER_PORT = 4027, LISTENER_IP = ALL) FOR SERVICE_BROKER (MESSAGE_FORWARDING = DISABLED , AUTHENTICATION = WINDOWS NEGOTIATE , ENCRYPTION = DISABLED)
Both routes has ADDRESS = tcp://dtraaboriss:4027.
I gave public grant on endpoint, queues & services of both databases. The error message that I get in transmission_queue and in SQL server log: "Service Broker login attempt failed with error: 'Connection handshake failed. An OS call failed: (80090304) 0x80090304(error not found). State 66.'. [CLIENT: 127.0.0.1]"
Dim objConn As New SqlConnection Dim objCmd As New SqlCommand Dim Value As String = EventCmb.SelectedItem.ToString() objConn.ConnectionString = "Data Source=.SQLEXPRESS;AttachDbFilename='C:Documents and SettingsHPMy DocumentsVisual Studio 2005WebSitesFYP2App_DataEvent.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True" Try objConn.Open() objCmd.Connection = objConn objCmd.CommandType = CommandType.Text objCmd.CommandText = "SELECT EventTel FROM Event WHERE (EventID = @Value)" ' See how i changed Value to @Value. This is called a Named Parameter objCmd.Parameters.AddWithValue("@Value", Value) ' Add the @value withthe actual value that should be put. This makes it securer Dim RetVal As Object = objCmd.ExecuteScalar() ' This returns the First Column of the first row regardless of how much data is returned. If Not ((RetVal Is Nothing) Or (RetVal Is DBNull.Value)) Then ContactLbl.Text = RetVal.ToString() Else ' noting was returned End If Catch ex As Exception Throw ex Finally objConn.Close() End Try There's an error for in line "Dim RetVal As Object = objCmd.ExecuteScalar() " Error Message is as follow "Conversion failed when converting the nvarchar value 'LTA' to data type int." It is due to "ExecuteScalar() " can only store int? I just need to display one data, and Value data comes form a combo box "EventCmb", which i wanted to find the selected String, compared to the "Event" database to get the "EventTel" data How do i solved this problem, any advice? Thanks!
I'm attempting to copy data from an Epicore server with multiple company databases to another server. All this data will be placed in a single table on the receiving server with the addition of an database identifier, so that the receiving department will know, to which company the data belongs. I have code that will dynamically create the SQL and then execute it using EXEC (@SQL), and this works just fine acrosss multiple databases. I've read in my Transact-SQL Programming book that using EXEC() is not limited to 255 characters, but it still appears that my dynamically created SQL is being shortened. The insert statement and the select statement list each column, and here is that code:
I have the following code and it seems that it is not comparing the request_close_date. What I want to do is compare the request_close_date between two tables and if it is less than the date from the TEAM3B_PULL_TOTAL_TST then insert the data into RDD_UPDATE_TST. Any help will be appreciated. It also needs to insert data into RDD_UPDATE_TST if a request exists in REQUEST_BUS_REQ and BUS_REQ_DESCRIPTION. I think that I have that coded correctly but I am not certain.
Thanks in advance, Anne
begin Insert into RDD_UPDATE_TST(request,business_req_id,test_case_i d,test_case_descr,request_close_date) select distinct request,business_req_id,test_case_id,test_case as test_case_descr,request_close_date from TEAM3B_PULL_TOTAL_TST A where not exists (select * from BUS_REQ_DESCRIPTION_TST B where A.REQUEST = B.REQUEST) and not exists (select * from REQUEST_BUS_REQ_TST C where A.REQUEST = C.REQUEST) and not exists (select * from RDD_UPDATE_TST D where A.REQUEST = D.REQUEST) and exists (select * from RDD_UPDATE_TST where REQUEST_CLOSE_DATE <>B.REQUEST_CLOSE_DATE) end
epost char(60) default NULL, i must be a @ value in it! any ides?
kon ENUM('M','K','V') default 'M', is this right, must only be enable to type in this Alphabets sings MKV!
losenord char(60) default NULL, verlosenord char(60) default NULL, How do i get a or fix a retype field for this losenord and verlosenord thay must be the same value to be insered in to the sql!