일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- C#
- Java
- MANTIS
- Bootstrap
- 웹뷰
- Redirect
- Web Service
- scrollView
- varags
- 안드로이드
- 자바
- javascript
- SpringSource Tool Suite
- decompiler
- STS
- asp.net
- WebView
- Apache Lucene
- 이클립스
- TextBox
- 컬럼명
- 자바스크립트
- html
- MSsql
- jsp
- MS-SQL
- Android
- Eclipse
- 웹 서비스
- Maven
- Today
- Total
목록C# | ASP.NET (43)
bboks.net™
Java의 System.currentTimeMillis() 와 동일한 효과를 내는 C# code public long CurrentTimeMillis() { DateTime Epoch = new DateTime(1970, 1, 1); return (long)(DateTime.UtcNow - Epoch).TotalMilliseconds; } C#에서는 기준점이 0001-01-01이지만 Java에서는 1970-01-01이다. 또한 C#은 local date를 사용하지만 Java는 UTC date를 사용한다. 따라서 기준일을 1970 년 1월 1일로 설정하고 시간도 UTC로 얻어와 계산하면 된다. [출처] Java System.currentTimeMillis() equivalent
Cause A public or protected type contains a public or protected method that uses the VarArgs calling convention. Rule Description The VarArgs calling convention is used with certain method definitions that take a variable number of parameters. A method using the VarArgs calling convention is not Common Language Specification (CLS) compliant and might not be accessible across programming language..
ExecuteScalar를 이용하면 SqlDataReader를 이용하지 않고도 Row Count를 얻을 수 있다. 일반적인 사용 방법은 int rowCount = SELECT Count(column_name) FROM table_name int rcds=0; sqlcmd.CommandText="Select count(*) from my_table where recdid='Active'"; rcds = sqlcmd.ExecuteScalar(); if(rcds>0) { sqlcmd.CommandText="Select Info1 from my_table where recdid='Active'"; myrdr = sqlcmd.ExecuteDataReader(); while(myrdr.Read()) { //Read..
//Connection SqlConnection con = new SqlConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["연결문자열"].ConnectionString; con.Open(); //Command SqlCommand cmd = new SqlCommand(); cmd.Connection = con; //사용할 프로시저 cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "sp 이름"; //입력 파라미터 cmd.Parameters.AddWithValue("@param1", "1234"); cmd.Parameters.AddWithValue("@par..