Connecting to an Azure SQL Database from VB6

We have an old Application that is accessing a database located on a client site. We currently access this database using ADO and SQL Authentication. Would it be possible to migrate to Azure SQL Server and connect to it from the VB6 Application by just changing
the connection string?

Yes, but you have to make sure that you are not using any features that SQL Azure doesn't support. And make sure that the SQL Azure server address is open for connection from outside. You also need to be concerned about data security.
Frank

Similar Messages

  • Connecting to an Azure SQL Database from a Windows C# Form

    Hi,
    Is it possible to connect to an SQL database in Azure from Visual Studio C# 2010 or 2012? If so how is this done. Is it the same as if you were connecting to SQL Express database with the use of a connection string? Any directions or tutorials would be of
    great help!
    Thanks!

    Hi,
    >>Thanks for the reply Paul, That is disappointing. I am trying to get my students to create a C# application that will connect with a database in Azure. Is there another approach besides SQL that I could use?
    Using SQL Azure will work fine (see below), if the students are familiar with SQL Server and SQL Databases it will be great for them to see how it works in the cloud. As an alternative you could explore Azure Storage, using Table Storage, Blob Storage or
    the new Document Database features.
    >>Azure enforces a firewall that prevents direct external access to the database server. You can add a firewall rule allowing external access, but the rules only support connecting from a fixed IP address because you have to specify the numeric IP
    from which connection will be allowed.
    You can specify ranges here, so you could cover a range of IP addresses. You can even specify 0.0.0.0 to 255.255.255.255 and allow all IP addresses, this could be an option if you don't know where the students will be connecting from, and you are using a
    database for the exercise where you don't care too much about the security.
    When I have run classes I typically use an IP address range, for example XXX.YYY.ZZZ.0 to XXX.YYY.ZZZ.255 if the students are accessing from the same classroom, and the external IP address may vary. You may find that they all have the same external IP address
    if they are on the same internal network.
    Also, with many students accessing the same database, you may get throttling if they place a lot of load on it. This is cool, as you can also teach them about transient fault handling and resource throttling :-).
    Regards,
    Alan
    Free e-book: Windows Azure Service Bus Developer Guide.

  • Can I connect Azure SQL Database from Project Siena ?

    Can I connect Azure SQL Database from Project Siena ?
    I want to connect Azure SQL Database of Office 365 SharePoint's Access App from Project Siena.
    Access App's Database is Azure SQL Database.
    and can connect to Excel/PowerBI/etc.
    Access App's Database can connect from specific location / any locations.
    Access App's Database can allow read-only connection / read-write connection.
    I want to create Windows App connected to Access App's Database.
    Regards,
    Yoshihiro Kawabata.

    Hi Yoshihiro,
    Could you share more with us about the high level scenario for what you are trying to accomplish offline? We can discuss further at
    [email protected]
    Once we are done, we will definitely share our findings with the community.
    Thanks!

  • Consistently getting "The wait operation timed out" when connecting to Azure SQL Database from a virtual instance...

    I have a web app that is backed by a an Azure SQL Database. The problem is that I had multiple issues when connecting to the database mainly when trying to establish a connection, or timeouts. This is the log I just encountered when trying to use the web
    app.
    [Win32Exception (0x80004005): The wait operation timed out]
    [SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21970; handshake=1; ]
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +671
    System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +116
    System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1012
    System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +6712291
    System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +152
    System.Data.SqlClient.SqlConnection.Open() +229
    System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +102

    Hi Affar2k,
    According to your description, we need to verify if there is no network issue and the Sqlclient version is older than .NET 4.5.  You can try to connect to the Windows Azure SQL database via SSMS and check if it can run well. When you
    connect to the SQL Azure database via ADO.NET, you need to verify that the server name and passwords are right in the connection string.
    For more information, you can review the following article about how to connect to Windows Azure SQL Database using ADO.NET.
    http://msdn.microsoft.com/en-us/library/windowsazure/ee336243.aspx
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Cannot Connect to Azure SQL Database in Visual Studio 2013

    Beyond Frustrated here.
    I am trying to connect to an Azure SQL database - it has been created, has tables etc. I am trying to create a new Data Connection from within Visual Studio 2013, latest release for VS and Azure. I continue to receive the following error:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
    I have ensured that TCP is allowed and above Named Pipes in the Configuration Manager. The associated IP address is allowed on Azure Firewall. Certificate has been added to VS etc. But still no connection. I can see the database in the Azure section in Server
    Explorer, but cannot add a Data Connection. What is equally as frustrating is I have a MacBook Pro running Win 7 sitting right next to my office computer and it can access Azure fine, not problems.
    If anyone has any other ideas on how I might be able to solve this I would love to hear them. Thanks in advance.
    Jeff

    Hi,
     The Error message "   A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is
    configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53) "
    The issue comes up mainly because the application is not able to connect to the server.
    To resolve this issue, try the following steps (in that order):
     Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
     2.  Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this, see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
    Try increasing the connection timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
          If these  steps do not resolve your problem, follow the below steps to collect more data and contact support:              
       If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing ID.
    Microsoft Customer Support Services can use this information.                   
       For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.                
      Check out
    the list of best practices for Connecting to Windows Azure SQL Database.
    Regards,
    Shirisha Paderu.

  • Connecting to Azure SQL database in Access 2010

    I've recently purchased a new computer and I had an OBDC connection set up to link to a sql database in azure through access. I am trying to set it up on my new computer but I'm unable to define the specific database. I'm able to make the connection but
    it only allows me into the master database. I've added my IP address in the configure servers but still can't get things to work. Any help would be greatly appreciated.
    thanks
    Lynn

    Hi,
    The following guidelines apply to SQL Database connections using ODBC:
    • When using SQL Server Native Client from SQL Server 2008 R2 or SQL Server 2008, the connection string must include the server name as part of the user name (user@server).
    • You must use TCP/IP as the protocol when connecting to an Azure SQL Database.
    • You cannot create a table in the master database, so therefore you must create a user database to create a table.
    • You cannot execute a use database command to switch to your user database. You must disconnect and connect directly to the user database.
    • You must have a primary key or clustered index on your table to be able to insert data.
    Ref:
    https://msdn.microsoft.com/en-us/library/azure/hh974312.aspx?f=255&MSPPError=-2147217396
    http://blogs.office.com/2010/06/07/access-2010-and-sql-azure/
    https://support.microsoft.com/en-us/kb/2028911/
    Hope this helps you.
    Girish Prajwal

  • Can No Longer Connect to Azure SQL Databases

    As of this morning, I am no longer to connect to any of my Azure SQL databases by any (apparent) means. I checked the configuration in the azure portal and my IP address is listed as an allowed IP, however:
    I am unable to connect via SQL Server Management Studio
    My request times out when attempting to visit https://{server_name}.database.windows.net
    What might have caused this?

    Hi ,
    Thanks for posting here.
    To resolve the issue you can try the following steps (in that order):
                    Check the application’s connection string to make sure that it is correctly configured. For example, make sure that the connection string specifies the correct port
    (1433) and the fully qualified server name.                
    Note You can follow these steps to obtain the connection string from the Azure Management Portal:                  
                          Log on to the
    Azure Management Portal.                    
                          In the left navigation pane, click
    SQL Databases.                    
                          Select your Azure SQL Database server.                    
                          Click
    Dashboard.                    
                          On the right side, go to the
    quick glance section, and then click Show connection strings.                    
                    Make sure that TCP IP is enabled as a client protocol on the application server. For more information on how to do this, see
    Configure client protocols. On application servers where you do not have SQL Server tools installed, you can check this by running cliconfg.exe (SQL Server Client Network Utility).              
                    Test the connectivity between the application server and the Azure SQL database by using a UDL file, ping, and telnet. For more information about how to do this,
    see
    Azure SQL Database connectivity troubleshooting guide and
    Troubleshooting SQL Server connectivity issues.                
    Note As a troubleshooting step, you can also try to test the connectivity on a different client computer.                
                    Try increasing the connection
    timeout. Microsoft recommends using a connection timeout of at least 30 seconds.              
                    As a best practice ensure retry logic is in place. For more information about the retry logic, see
    Azure SQL Database best practices to prevent request denials or connection termination.              
                  If the previous steps do not resolve your problem, follow these steps to collect more data and contact support:              
                      If your application is a cloud service, enable the logging. This step returns a UTC time stamp of the failure. Additionally, SQL Azure returns the tracing
    ID.
    Microsoft Customer Support Services can use this information.                
                      For more information about how to enable the logging, see
    how to enable diagnostic logging for Azure Web sites and Developing SQL Database Applications section in
    Azure SQL Database Development Considerations.
    Please write back with the exact Error message/ Error Code if this doesn't help.
    Regards,
    Shirisha Paderu.

  • Troubles Exporting SQL databases from Azure

    1. If I connect via SQL Server Management Studio and choose Export Data Tier Application to local disk, it never ends
    2. If I export via Azure web portal, it takes few hours
    3. The only way that works is using  SQL Server Management Studio and exporting to Azure container and then downloading it and importing via SQL Server Management Studio, seems like a lot of hassle
    I need Azure SQL database to be transferred daily to my local machine, preferably automatically. How can I do it?

    Hi Alex,
    Since the issue regards Windows Azure SQL Database, I will help you move the question to the related forums, It is appropriate and more experts will assist you.
    As Olaf’s post, if you want to migrate databases between the SQL Server Database Engine and Windows Azure SQL Database, you can use the Windows Azure SQL Database Import and Export operations to copy databases between two different SQL Database servers.
     In addition, you can also use the Windows Azure SQL Database copy database feature to make a consistent copy of a database, and perform the export from the copy. For more information, see
    Copying Databases in Windows Azure SQL Database. And you also can migrate a database by using the generate scripts wizard. For more information, see:
    How to: Migrate a Database by Using the Generate Scripts Wizard (Windows Azure SQL Database)
    According to your description, you want to migrate database daily and automatically, you can configure automated exports to schedule export operations for a SQL database, and to specify the frequency of export operations, and to set the retention period
    to store export files. Also you can set data sync between SQL Server and Windows Azure SQL database, configure bi-directional for database. For more information, see:
    Windows Azure SQL Data Sync.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Yesterday I was able to connect Azure SQL Database - Today I am not

    Hello Everyone,
    I have problem with establishing connection with Azure SQL Database. I have read many articles here, tried some solutions but none worked.
    0. On last Friday everything worked well - today it does not.
    1. I added my public IP Address in Azure Management Portal earlier.
    2. I tried different types of login-ways: login@nameserver, I used numeric addresses instead of server names, I set TCP connection manually, added encryption in one case either, tried do establish connection with particular database
    3. Firewall does not block 1433 out connection
    4. My IP address is static
    5. I have no error message displayed using Microsoft SQL Server Management Studio - it just hangs.. - no response at all
    6. I cannot ping the machine but its name is resolved correctly - maybe it does not respond using echo reply on purpose
    7. Status of my database is Active - I am able to connect it and manage via browser and management portal at the moment
    8. When I am trying to connect database via Visual Studio - it hangs.. - VS must be stopped manually via task manager
    9. My local CloudService has problem with connection to the db either
    10. Currently I am not able to deploy my CloudService because when I am trying to Publish it - VS hangs as soon as first Publish dialog window appears. Looks that I am able to deploy cloud service via Management portal only.
    I am still trying to dive into the problem but at this moment I would be grateful for any clues.
    Regards,

    Hi Mekh, hi everyone
    PROBLEM SOLVED.
    Yestarday I updated Azure Firewall rule and database-level firewall rules (master, my_database). I added special input / output protocols (IP, TCP, UDP) rules to my COMODO firewall (MSSMS could send anything and receive anything using IP, TCP and UDP). Status
    of my computer -> database connection was set to ESTABLISHED in netstat output but MSSMS was still unavailable (no response at all - no error message).
    I DECIDED TO UNINSTALL COMODO AT ALL and then if it does not work - reinstall local SQL Server, MSSMS and finally Visual Studio. When Comodo was gone - problem was gone either. Now I have connection with my database using MSSMS and I do not have to reinstall
    anything more.
    Regards,

  • Migrating from Azure SQL Database to SQL Server VM

    I'm looking for steps/documentation to migrate a database from Azure SQL Database to SQL Server VM in the cloud. I want to make an app whose data is initially hosted in the former. Due to a few reasons, I might have to migrate to SQL Server VM. I'd
    like to design the app such that ideally there is no downtime. Looking for guidance...

    You can create bacpac file from Azure SQL database and Restore this bacpac file into SQL Server VM or any other place.
    Please refer below URL for more details:
    http://blogs.msdn.com/b/mast/archive/2013/03/04/different-ways-to-backup-your-windows-azure-sql-database.aspx
    dharampal sikhwal

  • Sql Server Web Edition Reporting Services errors when trying to connect to Windows Azure SQL

    I am using a preconfigured image from the Azure VM Gallery to create a VM.
    --> Sql Server 2012 SP1 Web running under Windows Server 2008 R2
    After configuring Reporting Services I get the following error when trying to run a report that connects to my Azure SQL db.
    An error has occurred during report processing. (rsProcessingAborted)
    An attempt has been made to use a data extension 'SQLAZURE' that is either not registered for this report server or is not supported in this edition of Reporting Services. (rsDataExtensionNotFound)
    On the VM using SSMS I can connect to the Azure SQL db.  On the VM in Report Builder when I define a connection I get a similar error to the one above when I test that connection.  I am using Microsoft Azure SQL as the data source type. 
    Interestingly in Report Builder, if I proceed past the connection definition, I can see the tables from my Azure SQL db in the dataset definition page.
    One more note.  If I use a different image from the Gallery (Sql Server 2012 Standard SP1 on Windows Server 2012) my report builder connection works and the reports run fine.  I believe that the Azure documentation says that Sql Server Web edition
    is an acceptable choice for the SSRS on VM for reporting.
    Any thoughts or suggestions?
    Thanks -- Tom Reilly

    Hello,
    A VM with SQL Server 2008 R2 or 2012 supports all Reporting Services features, including all supported data sources, customization and extensibility, and scheduled report execution and delivery.
    Did you run the report in Report Manager,or preview the report in Report Builder? Which version of the Report Builder you installed in the Windows Azure VM? SQL Reporting does not support reports created from Report Builder 1.0 or 2.0. You can create reports
    using Report Builder 3.0 and then upload the reports.
    What's more, please also check the database source credential of the report.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • How to connect and query the sql database in mobile application

    Hello,
    Can any one say how to connect the sql database from the j2me application.
    I have got some info that only through servlet or jsp only we can connect the database and from their we should get the info or query in mobile application.
    Is it true? and can i have any sample codes or white paper or guildlines.
    It would be more useful form my project.
    Thanks in advance.
    regards,
    sara

    Hi David,
    According to your description, when you add Windows Azure Mobile Services to a Window Phone 8 app, then store app data in the new mobile service. I recommend you post the related question on the Windows Azure Mobile Services Forums at
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=azuremobile .It is appropriate and more experts will assist you.
    In addition, there are the details about creating a Windows Phone app connected to your mobile service.
    http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-wp8/
    http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-data-wp8/
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Concerns over switching between new Azure SQL Database Service Tiers

    Windows Azure's new SQL Database
    service tier pricing model will be put into effect in less than 12 months. We currently have SQL Databases on the Business and Web Edition pricing models.
    We recently asked Azure Support a number of questions around the scalability and ability to switch between these tiers. The responses so far have been far from encouraging:
    Q: If we exceed the criteria for a given tier (see http://msdn.microsoft.com/library/azure/dn741336.aspx), how will Azure respond? For example, if we are on the S1 service tier, and we exceed the maximum number of sessions (200), will any new sessions be
    blocked until we manually increase the service tier? Or will you automatically move (and bill) us to/for the next tier level?
    A: If you exceed the criteria of the existing tier, you shall be notified of performance issue like throttling. Users may experience slowness and blocking. There will not be any automatic upgrade.
    Q: So to confirm, if we suddenly experience increased, unanticipated client activity overnight due to our web site becoming more popular, you will be blocking any user sessions over and above our performance level limit, until we manually make the transition
    to the next level? Is there no “overdraft” facility/scalability in this respect? If this scenario took place within a short space of time, how would we have time to react? Simply blocking new sessions and preventing customers from using our site is not acceptable.
    A: I’m sure you understand that SQL Azure database is a shared resource and hence we cap the resources for individual subscription so that a fair service is provided to all the concurrent users. If you feel that you cannot compromise on the user experience
    then you shall think of an edition that best suits you. Please refer to the following document to best understand the throttling and its impact. http://social.technet.microsoft.com/wiki/contents/articles/1541.windows-azure-sql-database-connection-management.aspx#Throttling_Limits
    Q: Since the changing of the performance level could take several minutes/hours depending on the size of the database, would we experience any downtime/degradation of performance of the database during this period?
    A: You might
    Q: If downtime/degradation of performance are a possibility whilst we switch service tiers, what do Microsoft recommend we do to safeguard against this? Should we create a second database on a higher tier level and then export the data from the lower tier and
    import to the higher, before switching over? How do Microsoft recommend we switch tiers in a production environment with minimal disruption?
    A: If you want to upgrade the tiers due to degradation of performance, you will have to create another database on a higher tier and import the data.
    One of our key reasons for moving to Azure hosting was the seamless scalability it appeared to offered. As you can imagine, the responses above are a major concern for our production environment. Does anyone else have any thoughts or concerns in this respect?

    James,
    I reviewed the support incident you referred to and believe that the questions you asked may have been answered later in the interaction you had with the engineer.  For the benefit of others viewing this forum I want to reiterate the answers
    to your key questions here as well.
    Q. What is the behavior when you reach the limits for the service tier?
    A. Each service tier currently has limits on 4 different dimensions (CPU, physical reads, log writes and memory) of resource consumption.  When you reach one of the limits, the behavior depends on which resource limit you are hitting, but
    generally speaking is consistent with the behavior you would see with a similar hardware limit in the SQL Server box product.  For example, when you reach the CPU limit your queries will start showing more SOS_SCHEDULER_YIELD waits,
    the memory limit will cause a higher percentage of pages to be read from disk instead of the buffer cache (PAGEIOLATCH_xx waits), etc.  This set of limits does not directly abort any of your queries--they just run longer as they
    vie for the fixed set of resources made available to your database.  In a system where the load greatly exceeds the resources, queries may start to time out.
    The new service tiers continue with the Web/Business edition behavior of limiting the number of sessions and concurrent requests (worker threads) you can have.  When you exceed these limits you'll get error 10928.  Note that
    each tier in Basic/Standard/Premium have different values for these limits (http://msdn.microsoft.com/en-us/library/azure/dn369873.aspx) than Web/Business and thus may encounter the errors at different usage levels.  The key is choosing the appropriate
    service level for the application, and to facilitate that the sys.resource_stats view shows historical usage information so you know where you stand as far as reaching any of the limits.  This resource consumption data is also available in the portal.
    Q. Is it possible to switch service tiers, and is there any disruption when you do so?
    A. Yes, you can change between service tiers as described in this MSDN documentation (http://msdn.microsoft.com/en-us/library/azure/dn369872.aspx).  This can be done through the portal, powershell, or REST APIs.  [The preview currently has a restriction
    where legacy servers don't support switching to Basic/Standard which is expected to be removed in the near future.]  The link above outlines the limits on the number of tier changes you can do in a 24 hour period, expected time to perform the change, and
    the client disconnect that occurs.
    If you have further questions, feel free to re-engage on the support incident or reply to this forum thread.

  • Can SQL Server SSIS on VM access Azure SQL database?

    I have SQL Server BI on Azure VM.
    Can SSIS Access Azure SQL database? I need to fetch data.
    Kenny_I

    Hi,
    You an able to do this by running ssis locally and connect Azure SQL. Below link expains this well in detail.
    http://beyondrelational.com/modules/2/blogs/84/posts/13234/how-to-use-sql-server-integration-services-ssis-to-migrate-data-from-sql-server-to-sql-azure-paras-d.aspx
    Regards,
    Santhosh.
    www.jijitechnologies.com

  • Database Initialiser does not create azure sql database

    I have a WPF application In the OnStartup in the app.cs I set the Database initializer and forced the context the initialise my database:
    Debug.WriteLine("Setting Initializer");
    Database.SetInitializer<MyContext>(new MyDatabaseInitializer());
    Debug.WriteLine("Declaring new context");
    using (MyContext c = new MyContext("MyContext"))
    Debug.WriteLine("Force the initialization");
    c.Database.Initialize(true);
    Debug.WriteLine("Done!");
    I created a sql database in the management portal of the azure.
    Copied the connectionstring it provided for ADO.net.
    But my database is not created.
    I also added a firewall rule but nothing happens. I Have no clue what to do.
    Can anybody please help me with this?
    If you need more information please ask i really have to get this sorted out.
    Thanks in advance!

    Hi Turkstra,
    I have tried to use EF to create Azure SQL database, it works as expect, the database 'jambordbcreate' appear in my SQL Azure, below is the detailed codes.
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace CodeFirst
    class Program
    static void Main(string[] args)
    Database.SetInitializer(
    new CreateDatabaseIfNotExists<SchContext>());
    using (var db = new SchContext("Server=tcp:****.database.windows.net,1433;Database=jambordbcreate;User ID=vote@***;Password=***;Trusted_Connection=False;Encrypt=True;Connection Timeout=30"))
    string name = "jambor";
    var student=new Student(){Name=name, ID="1a"};
    db.Students.Add(student);
    db.SaveChanges();
    db.Database.Initialize(true);
    public class Student
    public string ID { get; set; }
    public string Name { get; set; }
    public string age { get; set; }
    public string sex { get; set; }
    public class School
    public string ID { get; set; }
    public string Name { get; set; }
    public virtual List<Student> Students { get; set; }
    public class SchContext : DbContext
    public SchContext(string connection):base(connection)
    public DbSet<Student> Students { get; set; }
    public DbSet<School> Schools { get; set; }
    I suggest  you check your SQL connection, after run your code, please refresh azure portal to see whether your database is exist. Hope this give you some help.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Iphone activation online is not working

    So heres my issue. I got the iphone 4 yesterday. Did what it said online to activate it, it said it was pending, but my iphone 4 never gave any indication it was in the process of activating nor did i recieve an email saying the process was starting.

  • How to change com.sap.aii.connect.integrationserver.r3.mshost

    Hello Colleagues, java system is down,i want to change the com.sap.aii.connect.integrationserver.r3.mshost -81xx in configtool. can u please tell me  where to change in configtool???

  • Log and transfer troubles

    Hi, I'm using Log & Transfer in order to import my Canon EOS 5d Mk iii video files on Final Cut Pro 7. Until 2 days ago it was working without problems. Now he doesn't work: since is starting the conversion it shows "clip duration 23 hours" and it do

  • Hi, i've found this strange behaviour:

    Hi, i've found this strange behaviour: if i open a pdf file from a pen drive, and after i try to print it, i have the message: You need to install a printer...... then if i copy the same file to the hdd, then i open this file and print it, now i can

  • BI extractor and/or content for BPM available?

    Hallo I have a question concerning BPM. Does anybody know if there is standard content and/or an extractor to retrieve BPM Process Data from the CE 7.1? I am looking for something similar as the SAP Workflow extractor and/or data model. Does someone