Click here to Skip to main content
14,385,176 members
   

C#

 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
OriginalGriff1-Nov-19 0:09
MemberOriginalGriff1-Nov-19 0:09 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 146412241-Nov-19 0:14
MemberMember 146412241-Nov-19 0:14 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
OriginalGriff1-Nov-19 0:26
MemberOriginalGriff1-Nov-19 0:26 
GeneralRe: C# Sql calling function - SELECT from two diffrent Sql folders Pin
Member 146412241-Nov-19 1:11
MemberMember 146412241-Nov-19 1:11 
QuestionALPHA CHANNEL Pin
Member 1463438031-Oct-19 3:05
MemberMember 1463438031-Oct-19 3:05 
AnswerRe: ALPHA CHANNEL Pin
Richard MacCutchan31-Oct-19 5:05
MemberRichard MacCutchan31-Oct-19 5:05 
QuestionArgument 1: cannot convert from 'object' to 'string' Pin
Member 1463942031-Oct-19 1:53
MemberMember 1463942031-Oct-19 1:53 
AnswerRe: Argument 1: cannot convert from 'object' to 'string' Pin
OriginalGriff31-Oct-19 2:19
MemberOriginalGriff31-Oct-19 2:19 
First off, to identify what your problem is, we need to know exactly where in that code the error is being reported. This is not a good question - we cannot work out from that little what you are trying to do. Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.

Second, your connections string looks OK for yoru dev system - but we have no idea if it works as we have no access to your system to check. But it's unlikely to work in the real world, as it uses integrated security and SQLEXPRESS, and that's unlikely to be the case once you leave your dev machine.
You can try looking here: Simple SQL Connection String Creation[^] which will help you test it.

Third, Connection strings should never be hard coded: you should load them from the web.config file and keep separate web.config files for prod and dev.

Why not just use the DataTable as the DataSource for the ListBox?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Member 1463942031-Oct-19 2:35
MemberMember 1463942031-Oct-19 2:35 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
OriginalGriff31-Oct-19 2:47
MemberOriginalGriff31-Oct-19 2:47 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Member 1463942031-Oct-19 2:59
MemberMember 1463942031-Oct-19 2:59 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
OriginalGriff31-Oct-19 3:20
MemberOriginalGriff31-Oct-19 3:20 
AnswerRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard MacCutchan31-Oct-19 2:37
MemberRichard MacCutchan31-Oct-19 2:37 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Member 1463942031-Oct-19 2:57
MemberMember 1463942031-Oct-19 2:57 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Dave Kreskowiak31-Oct-19 3:16
MemberDave Kreskowiak31-Oct-19 3:16 
GeneralRe: Argument 1: cannot convert from 'object' to 'string' Pin
Richard Deeming31-Oct-19 3:45
MemberRichard Deeming31-Oct-19 3:45 
QuestionCreate New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
Member 1045263729-Oct-19 22:10
MemberMember 1045263729-Oct-19 22:10 
AnswerRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
OriginalGriff29-Oct-19 22:44
MemberOriginalGriff29-Oct-19 22:44 
GeneralRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
Member 1045263730-Oct-19 0:07
MemberMember 1045263730-Oct-19 0:07 
GeneralRe: Create New Label when click button in window form, move it when click and move mouse, and save it again when close file exe Pin
OriginalGriff30-Oct-19 0:22
MemberOriginalGriff30-Oct-19 0:22 
QuestionHow to solve complex captcha in C# Pin
rflprado29-Oct-19 6:53
Memberrflprado29-Oct-19 6:53 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 6:55
MemberOriginalGriff29-Oct-19 6:55 
AnswerRe: How to solve complex captcha in C# Pin
OriginalGriff29-Oct-19 6:56
MemberOriginalGriff29-Oct-19 6:56 
Questionc sharp Pin
Member 1115563928-Oct-19 10:41
MemberMember 1115563928-Oct-19 10:41 
AnswerRe: c sharp Pin
OriginalGriff28-Oct-19 11:37
MemberOriginalGriff28-Oct-19 11:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.