Skip to content

Commit

Permalink
获取 index
Browse files Browse the repository at this point in the history
  • Loading branch information
maikebing committed Nov 15, 2020
1 parent db39737 commit a68291e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ static void Main(string[] args)
cmd_select.CommandText = $"select * from {database}.t";
#pragma warning restore CA2100 // Review SQL queries for security vulnerabilities
var reader = cmd_select.ExecuteReader();
int index =reader.GetOrdinal("cdata");
Console.WriteLine($"cdata index at {index}");
Console.WriteLine(cmd_select.CommandText);
Console.WriteLine("");
ConsoleTableBuilder.From(reader.ToDataTable()).WithFormat(ConsoleTableBuilderFormat.MarkDown).ExportAndWriteLine();
Expand Down

0 comments on commit a68291e

Please sign in to comment.