JustAskMe
asked on
Convert Sql String to c# string
Whats the correct syntex?
sCSharpStr = Convert.ToString(Your_SQL_ String);
HTH
Ashok
HTH
Ashok
ASKER
This is what I try to do:
System.Data.SqlTypes.sqlst ring to system string
System.Data.SqlTypes.sqlst
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you trying to read a string of text from a database? And how?
ASKER
ashok111: that works!
one small thing more...
string[] SL = Response.Split("<td><a class=");
one small thing more...
string[] SL = Response.Split("<td><a class=");
JustAskMe,
What is the problem?
Ashok
What is the problem?
Ashok
ASKER
The compiler doesn't like it
the error is that best overload.. excepts...
the error is that best overload.. excepts...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
SqlConnection conn = new SqlConnection("Connection String");
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT FIELD_NAME FROM Database_Name";
SqlDataReader mySqlDataReader = cmd.ExecuteQuery();
if(mySqlDataReader.Read())
string cSharpString = (string)mySqlDataReader["F
else
// no Records found, data reader is empty