|
H Snadeep,
closed_date is Blank... here is the table structure:
CREATE TABLE `visits` (
`visit_id` int(11) NOT NULL AUTO_INCREMENT,
`file_no` int(11) DEFAULT NULL,
`visit_is_open` bit(1) DEFAULT b'1',
`clinic_id` int(11) DEFAULT NULL,
`doctor_id` int(11) DEFAULT NULL,
`account_category` int(11) DEFAULT NULL,
`account_number` bigint(11) DEFAULT NULL,
`price_list_id` int(11) DEFAULT NULL,
`vital_signs_taken` bit(1) DEFAULT b'0',
`total_amount` double(11,3) DEFAULT '0.000',
`balance_amount` double(11,3) DEFAULT '0.000',
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_user` int(11) DEFAULT NULL,
`closed_date` datetime DEFAULT NULL,
`closed_user` int(11) DEFAULT NULL,
PRIMARY KEY (`visit_id`),
KEY `idx_visits_visit_id` (`visit_id`),
KEY `idx_visits_file_no` (`file_no`),
KEY `idx_visits_visit_is_open` (`visit_is_open`),
KEY `idx_visits_clinic_id` (`clinic_id`),
KEY `idx_visits_doctor_id` (`doctor_id`),
KEY `idx_visits_account_category` (`account_category`),
KEY `idx_visits_account_number` (`account_number`),
KEY `idx_visits_price_list_id` (`price_list_id`),
KEY `idx_visits_vital_signs_taken` (`vital_signs_taken`),
KEY `idx_visits_total_amount` (`total_amount`),
KEY `idx_visits_balance_amount` (`balance_amount`),
KEY `idx_visits_created_date` (`created_date`),
KEY `idx_visits_created_user` (`created_user`),
KEY `idx_visits_closed_date` (`closed_date`),
KEY `idx_visits_closed_user` (`closed_user`)
) ENGINE=MyISAM AUTO_INCREMENT=631 DEFAULT CHARSET=utf8;
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
This is the issue. You have set the field 'create_date' to be updated to current timestamp on any update - Wrong and not needed in your case.
Just keep it:
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON INSERT CURRENT_TIMESTAMP,
`created_date` timestamp DEFAULT NULL,
Pick that you need and apply.
As per other comment of MySQL, you can use NOW()
|
|
|
|
|
Hi,
Use DEFAULT Constraint....
ALTER TABLE visits MODIFY closed_date DATETIME NOT NULL DEFAULT NOW();
Check the following link
MySQL ALTER Command[^]
modified 4-Mar-13 4:25am.
|
|
|
|
|
I've got a scripted install for the database on a local tablet. The OS is windows 7, and it's sql 2008. I end up with this error:
Error: 18456, Severity: 14, State: 11.
Login failed for user 'FOO\BAR'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine="">]
I've only got one user account on the machine, and it is an administrator. The best solution I can find so far is "run ssms as administrator", which is not really a valid option. The DB is used by an application only, and we don't even have ssms. I just need the app to be able to use the database. I don't understand why it can't. This same installer has worked on the other machines before this one.
-edit-
I have followed up more on this being a UAC issue. I actually was going to shut off the notifications with the EnableLUA setting in the registry... but that has already been done. I think that rules out the account not having permissions issue.
-end edit-
If it moves, compile it
modified 2-Mar-13 7:02am.
|
|
|
|
|
this turned out to be an issue with the computer name and the user name being the same. Aparently as of Vista, this is an issue. I had ruled this out when I renamed the computer, uninstalled sql through add/remove programs, and ran the installer again.
Grabbing at straws I just happened to notice that the folders and files don't get removed when you add/remove sql through the control panel. I removed it again, and manually deleted the Microsoft SQL SErver folder, rebooted again, and installed. This worked.
If it moves, compile it
|
|
|
|
|
1. what is active database and why it is used?
2. What are the advantages and disadvantages of active database?
3. name some application using active database?
4. Compare with other databases?
|
|
|
|
|
This is not a simple technical question but more akin to research. Try using Google to locate some white papers and make use of the information you find.
Use the best guess
|
|
|
|
|
Sounds like a homework assignment.
|
|
|
|
|
More than likely; or even interview questions.
Use the best guess
|
|
|
|
|
1.Store data
2.Makes data available
3.Google
4.All databases are different!
5. Do your own homework.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Dear All,
I want create new user in SQL server 2005, and allow this user to run any SQL script ( most of this script use to select data using store procedure, create temp table , delete temp table...).
I want to protect this user, not allow him to delete any object such as database, table , view, function...
Can anyone help me please, I'm really stuck with searching...
Thanks.
|
|
|
|
|
LTM_it_kh wrote: I want to protect this user, not allow him to delete any object such as database, table , view, function...
Can anyone help me please, I'm really stuck with searching...
Permissions[^]
..it's not "protecting" the user, but "limiting" the user.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Dear gvprabu,
Thanks you so much for your help, finally i'm successful with to do it.
Regard,
|
|
|
|
|
i extract data my box's bin file...i get data ADLER32(8bits),crc32(8bits) ""md2(32bit),md4(32bit),md5(32bit) RSA ",sha1(40bits),haval256-4(64bit),whirlpool(128bits) keys
my que is which keys are rsa(working) md2,md4,md5 ?
Regards
|
|
|
|
|
Hi,
My database is on host (internet) and i wanna to get all records of one special table (it has about 1 million records) and insert into table in SQLite(in local-android mobile) .
the tables are same and only have 10 columns.
how can i do that with SP.
which way is faster?
|
|
|
|
|
How about getting your (online) records into a comma separated file, downloading the file, then importing the records into your SQLite database?
|
|
|
|
|
thanks for Solution,
but i wanna something like this cause the speed is very hight and wont take time :
SELECT tt.IdAmlak, tt.ParentId, tt.NameOpp, tt.Price, tt.[Square],
tt.OstanShahrMantagha, tt.PhoneAddress, tt.CountAmount
INTO TestTable
FROM tblTesting tt
tblTesting : Table in database Sql Server 2008 in server internet <br />
TestTable : Table in Database SQLite in local (android mobile)
|
|
|
|
|
Well, if you can have an ODBC connection to the server on the web, and one to the android device, there's no reason why you couldn't do something like that. I'm not convinced it would be quicker than simply downloading the csv file and processing it locally in one go...
|
|
|
|
|
thanks for solution
can u give me a sample for
csv file and processing it locally
and i can do this also ,so plz give sample :
if you can have an ODBC connection to the server on the web, and one to the android device
|
|
|
|
|
To create a csv file, simply run a query on your sql server and save the results to a file.
For the ODBC connection, create a couple of DSN's locally (one to the sql server, one to sqlite), then from a common location connect to both and run your query. This might be possible through a local SQL Server Management Studio copy, or through anything else that allows you to attach ODBC databases, even MS Access... Warning - MS Access will be very, very slow.
|
|
|
|
|
i have googled
what about this sp :
insert into CRM-CMS.dbo.tableName
select * from [217.66.216.77,1633].CRM-CMS.dbo.tblTesting
|
|
|
|
|
Try just running the select portion of it and see if you return results.
Your insert will need to use a field list though, not *. eg: insert into table1 (field1, field2) select field1, field2 from table2
Also, you would need to clear the data from your local table first if you are wanting to replace it with the data from your server.
|
|
|
|
|
i got this code :
but cannot run for SQLite :
i get this error in sqlite :
SQLite error near "INTO" : syntax error
cmd.CommandText = @"SELECT top(5) IdAmlak, ParentId, NameOpp, Price, [Square],
OstanShahrMantagha, PhoneAddress, CountAmount
INTO Melk
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=217.66.216.77,1633;User ID=tinadbuser;Password=dbtin123ir'
).[CRM-CMS].dbo.tblTesting";
|
|
|
|
|
You don't want to do this using a linked server; cleanest way is to generate the CSV (there's documentation on the internet); to send the CSV, and to bulkload it.
SQLite does not use TSQL. If you use multiple database-systems from different vendors, it'd be preferable to keep your SQL in the SQL92-dialect.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|