Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

theScorp

@theScorp
About
Posts
19
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Could not load assebly
    T theScorp

    Thanks.


    "If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡

    ASP.NET help announcement

  • Could not load assebly
    T theScorp

    I m getting this error when i try to build the web site.. Could not load file or assembly 'foo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied. I tried adding reference of PROJECT as well as by DLL. But no use :(. Plz help.


    "If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡

    ASP.NET help announcement

  • How to get data in column from dataset
    T theScorp

    As long as i know there is no difference in speed while retrieving data.


    "If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡

    Visual Basic tutorial question

  • How to get data in column from dataset
    T theScorp

    This[^] will convert it for u.


    "If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡

    Visual Basic tutorial question

  • How to get data in column from dataset
    T theScorp

    Both have their own importance. Lets consider an example Suppose you are getting data from Database using a Stored procedure. Stored procedure contains Select as.. Select ID, Name, Value from Table1 When you will use this DB procedure in the C#.. You have 2 options Either to get by Column name or by Index.. long id; String Name, Value; // using Index id = (long) lv_DtSet.Tables[0].Rows[0][0]; Name = (String) lv_DtSet.Tables[0].Rows[0][1]; Value = (String) lv_DtSet.Tables[0].Rows[0][2]; //using Column Name id = (long) lv_DtSet.Tables[0].Rows[0]["ID"]; Name = (String) lv_DtSet.Tables[0].Rows[0]["Name"]; Value = (String) lv_DtSet.Tables[0].Rows[0]["Value"]; Now, if you look at Index case you don't know which value u r retrieving. So, if someday DB person changes sequence of columns say.. Select ID, Value, Name from Table1 you r in trouble. B'coz no exception will be raised.. bt Name and Value will get interchanged. So I will prefer to use Column name in this case. B'coz Changing of column name in DB is less likely. And eventhough the Sequence of columns in Select query gets changed, u don't have to change your code. But there are some times.. u don't know column names OR u want to read data serially Column1, column2 etc.. then use Column indexes. Depends on situation. But I will prefer to use Column name as far as possible. And by the way its.. ROHAN :)


    "If our Mind can, the Program can !!" ≡ ░Ŗổђầŋ٭ ≡

    Visual Basic tutorial question

  • How to get data in column from dataset
    T theScorp

    Easy..//lv_DtSet is dataset containing data.. if (lv_DtSet.Tables[0].Rows.Count > 0) { foreach (DataRow lv_Row in lv_DtSet.Tables[0].Rows) { if (!Convert.IsDBNull(lv_Row["ColumnName"])) String ColumnData = (String)lv_Row["ColumnName"]; //Alternately u can use Column index also. } }


    "If our Mind can, the Program can !!" ≡ ░Ŗǿђầŋ٭ ≡

    Visual Basic tutorial question

  • helloooooooooooooooooo its urgent
    T theScorp

    Well u can use.. System.IO.File.ReadAllLines OR System.IO.File.ReadAllText then Modify string and then write using System.IO.File.WriteAllLines OR System.IO.File.WriteAllText Bt keep in mind this will overwrite the file.


    "If our Mind can, the Program can !!" ≡ ░Ŗǿђầŋ٭ ≡

    Visual Basic help question

  • Win32 APIs
    T theScorp

    If you want to call a specific function.. u can call as [DllImport("USER32.DLL")] public static extern int SendMessage(int hwnd, int msg, int character, String text);


    "If our Mind can, the Program can !!" ≡ ░Ŗǿђầŋ٭ ≡

    Visual Basic csharp linux json question

  • Application Shortcut
    T theScorp

    You will need to use Win32 API. here are functions you can use... [DllImport("USER32.dll")] public static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vlc); [DllImport("USER32.dll")] public static extern bool UnregisterHotKey(IntPtr hWnd, int id);


    "If our Mind can, the Program can !!"

    Visual Basic question csharp

  • File Download Feedback/result
    T theScorp

    How can I get if the File download was successful or not. I m simply using - Response.Redirect(url) The file download dialog box contains Save, Cancel. How could I know that User clicked Cancel? Is there any workaround? I hv also tried Response.Clear() Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name) Response.AddHeader("Content-Length", file.Length.ToString()) Response.ContentType = "application/octet-stream" Response.WriteFile(file.FullName) Response.End 'if file does not exist But how could i get the Result of Download operation?


    "If our Mind can, the Program can !!"

    ASP.NET question beta-testing code-review

  • Detect New mail arrival
    T theScorp

    How could I know, that a New mail is arrived in the account using POP3. I m taking help of Pop3MailClient[^] article Is there any POP3 command which will tell me that X number of New mails have arrived. Please guide me.


    "If our Mind can, the Program can !!"

    C# com help tutorial

  • Drop downList
    T theScorp

    function getVal() { //ddl1 is asp:DropDownList var a = document.getElementById('<%=ddl1.ClientID%>'); alert(a[0].text);//Text shown to user // alert(a[0].value);//Index }

    "If our Mind can, the Program can !!"

    ASP.NET javascript html sysadmin tutorial

  • How to kill a process in C#
    T theScorp

    System.Diagnostics.Process[] prCess =System.Diagnostics.Process.GetProcessesByName("QLSX.vghost.exe"); prCess[0].Kill(); Simple :)

    "If our Mind can, the Program can !!"

    C# csharp help tutorial

  • Function Parameters...
    T theScorp

    C# does not support Optional parameters.. Need to pass NULL instead.

    "If our Mind can, the Program can !!"

    C#

  • How to select letters in a string?
    T theScorp

    You can use.. String str = "abc"; foreach (char c in str) { // operations on letters. }

    "If our Mind can, the Program can !!"

    C#

  • how to show .00 with a number in datagridI
    T theScorp

    Use statment like - <%#DataBinder.Eval(Container.DataItem, "EnteredDate", "{0:dd.MMM.yyyy hh:mm tt}")%> I have used it to format DATE. u can use {0:F} or what ever u need.

    "If our Mind can, the Program can !!"

    ASP.NET docker tutorial question

  • how to make page as start page in IIS
    T theScorp

    In IIS, Under properties of ur website.. u need to add ur Default page name (Documents TAB).

    "If our Mind can, the Program can !!"

    ASP.NET csharp tutorial asp-net visual-studio windows-admin

  • how to create
    T theScorp

    Well try using "SQLDMO" dll This code worked for SQL 2000. Some code - Imports System.Data.SqlClient Imports SQLDMO 'Lists available servers Private oSqlServer As New SQLDMO.SQLServer Dim sqlDmoApplication As New SQLDMO.Application Dim serverList As SQLDMO.NameList serverList = sqlDmoApplication.ListAvailableSQLServers() 'Create Database Private Function createDB() As Boolean Dim oDatabase As SQLDMO.Database Dim oDBFileData As SQLDMO.DBFile Dim oLogFile As SQLDMO.LogFile oDatabase = New Database oDBFileData = New DBFile oLogFile = New LogFile Try 'Delete Database if it exists Call connectDB() 'If Not IsNothing(oSqlServer.Databases.Item(txtDBName.Text.Trim())) Then 'oSqlServer.Databases.Item(DBToCreate).Remove() 'Response.Write("Database with same name already exists") 'End If For i As Integer = 1 To oSqlServer.Databases.Count If txtDBName.Text.Trim().ToUpper = oSqlServer.Databases.Item(i).Name.Trim.ToUpper() Then lblAlert.Text = ("Database with same name already exists, please mention different name") Return False End If Next oDatabase.Name = txtDBName.Text.Trim() '"SOM_DB" ' Define the PRIMARY data file. oDBFileData.Name = txtDBName.Text.Trim() & "Data" ' Replace the following path with your own path to a database folder. oDBFileData.PhysicalName = "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\" & txtDBName.Text.Trim() & "_DB.mdf" oDBFileData.PrimaryFile = True ' Specify file growth in chunks of fixed size for all data files. oDBFileData.FileGrowthType = SQLDMO.SQLDMO_GROWTH_TYPE.SQLDMOGrowth_MB oDBFileData.FileGrowth = 1 oDatabase.FileGroups.Item("PRIMARY").DBFiles.Add(oDBFileData) ' Define the database transaction log. oLogFile.Name = txtDBName.Text.Trim() & "Log1" ' Replace the following path with your own path to a database folder. oLogFile.PhysicalName = "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\" & txtDBName.Text.Trim() & "_DB.ldf" oDatabase.TransactionLog.LogFiles.Add(oLogFile) oSqlServer.Databases.Add(oDatabase) oDatabase = Nothing oDBFileData = Nothing oLogFile = Nothing Return True Catch ex As Exception lblAlert.Text = "Error : " & ex.Message() Return False End Try End Function "If our Mind can, the Program can !!"

    Visual Basic database csharp tutorial

  • escape character
    T theScorp

    Well as far as i understand, u need to replace (') by ?('') (two single quotes) before storing it into database. ('') is nothing but the escape sequence for (') in Database (not i \n Vb.net). I guess this will solve the problem.

    "If our Mind can, the Program can !!"

    Visual Basic csharp database help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups