1

I am currently in the process of linking my Xamarin mobile app to an Azure database. In said application, I need to be able to insert data as the user continues to progress through the sign up pages. What I am having difficulty with is finding documentation regarding how to retrieve a row from a table that has a specific value in one of its cells. To simplify things and make sure I am understood, I have written out (briefly) what I am wanting to do in C# below.

Table table = new Table();
int rowID = 0;
string username;
if((/*table.row.contains(username))*/){
   rowID = table.row.index();
   var user = App.MobileService.GetTable<UserInfo>();
   user.InsertAsync(//Information from the UserInfo class).(//ToRow[rowID]);
}else{
   DisplayAlert("Uh-oh", "That username wasn't found, please check and make sure you entered it correctly", "Okay");
}

keep in mind the methods above that are commented out are made up; but I hope that gives you a better understanding of what I'm trying to achieve.

also, if anyone could be so kind as to point me in the direction of Azure documentation regarding working with their database with Xamarin mobile that would be amazing.. every time I think I've found some it turns out to be for a different platform.

cdunn2013
  • 214
  • 2
  • 14
  • Sorry, I don't use StackOverflow a lot... I'll be sure to keep this in mind for future reference. – cdunn2013 Aug 20 '18 at 18:24
  • are you asking how to query an Azure SQL db? ie, "select * from UserInfo where Username = 'some input value'"? – Jason Aug 20 '18 at 18:25
  • This is probably what you're looking for: https://stackoverflow.com/questions/20638351/find-row-in-datatable-with-specific-id – Devin L. Aug 20 '18 at 18:30
  • @jason I believe so.. basically what I'm attempting to do is find a row that contains a specific username (we'll use cdunn2013 for example). So if a row contains 'cdunn2013' it will insert more information (gender, location, etc.) into only that row. – cdunn2013 Aug 20 '18 at 18:31

0 Answers0